No margin added to related posts plugin
-
Hiya folks, for anyone wondering where the margins have gone since the latest AMP plugin update: Auttomattic changed the div class from ‘amp-wp-content’ to ‘amp-wp-article-content’.
The new code to implement via functions.php is:
//* Add content to the AMP template footer (AMP plugin Automattic) //* Place in your theme's functions.php function add_content_to_amp_footer() { ?> <div class="amp-wp-article-content"> <?php echo do_shortcode( "[amp-related-posts append='amp' heading='Related Posts' max='5']" ); ?> </div> <?php } add_action( 'amp_post_template_footer', 'add_content_to_amp_footer', 50 );
The topic ‘No margin added to related posts plugin’ is closed to new replies.