Support » Plugin: AMP » Duplicate Featured Image need to fix

  • Duplicate Featured Image, and no option to disable single not show Featured Image.
    Please add this option in this plugin. Thank you.
    My temporary solution is delete <?php $this->load_parts( [ 'featured-image' ] ); ?>
    from wp-content/plugins/amp/templates/single.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Weston Ruter


    Do you have a plugin which prepends the features image to the content?

    Plugin Author Weston Ruter


    As opposed to modifying the templates (which is bad because your changes are lost with each plugin update), put the following into your custom theme’s functions.php or a custom plugin:

    add_filter( 'amp_post_template_data', function( $data ) {
    	$data['featured_image'] = false;
    	return $data;
    } );

    This will prevent the Reader mode templates from showing the featured image.

    Thread Starter huixia0010


    Thank you for your reply~ Get it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicate Featured Image need to fix’ is closed to new replies.