The description of the plugin references “recent” posts frequently. I think this may be a typo, but I’d like to be sure.
]]>PHP Warning: Missing argument 4 for amp_related_posts_function(), called in /opt/webhost/content/wp-includes/shortcodes.php on line 345 and defined in /opt/webhost/content/wp-content/plugins/amp-related-posts/AMP Related Posts.php on line 788
this is recorded each time in apapche error log when an amp page accessed from browser
]]>Love the plugin. I was going through the error log on a site that is using your AMP Related Posts plugin and came across this PHP Warning in the error log.
[Wed Jan 18 17:24:10.785505 2017] [:error] [pid 1296] [client 66.249.66.147:39616] PHP Warning: Missing argument 4 for amp_related_posts_function() in …./wp-content/plugins/amp-related-posts/AMP Related Posts.php on line 788
I wanted to make sure you were aware of this.
]]>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 );
]]>