• Resolved yasuo

    (@sanazlux)


    Hello . I want to add tags code for the store page.
    In normal mode, Amp plugin cannot add downloads page tags.
    But it displays the labels of the posts

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter yasuo

    (@sanazlux)

    my website aryarom.com

    I want the following codes to be displayed in the Amp plugin

    <?php $download_tag = get_the_term_list($post->ID,'download_tag','','  ','');
    			if (!empty($download_tag)) {?>
    			<hr>
    			<div class="pixel-tags">
    				<span><i class="fal fa-tags fa-lg uk-text-middle ml-small"></i>برچسب ها: </span>
    				<span><?php echo $download_tag; ?></span>
    			</div>
    			<?php } ?>
    Plugin Support Milind More

    (@milindmore22)

    Hello @sanazlux

    Thank you for contacting us, We checked your AMP page it seems you are using Reader More with a Legacy theme, the legacy theme has different templates and hooks, you can learn more about customizing a Legacy theme using our documentation

    example code:

    add_filter( 'amp_post_article_footer_meta', function ( $meta_parts ) {
    	$meta_parts[] = 'xyz-download-tags';
    	return $meta_parts;
    } );
    
    add_filter( 'amp_post_template_file', function ( $file, $type, $post ) {
    	if ( 'xyz-download-tags' === $type ) {
    		$file = dirname( __FILE__ ) . '/templates/xyz-download-tags.php';
    	}
    	return $file;
    }, 10, 3 );

    Now create the xyz-download-tags.php in the specified path in xyz-download-tags.php file use your code.

    Plugin Support Milind More

    (@milindmore22)

    @sanazlux As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Tags store pages’ is closed to new replies.