Hello, I was trying my luck at coding a small WordPress plugin.. But, I am stuck at a point. How can I do this? <?php function myfunc($content) { $content.= '<span style="margin-top:10px" class="avatar"><?php echo get_avatar(get_the_author_email(), 70);?></span>'; return $content; } add_filter ('the_content', 'end_post'); ?> PHP: When ever I put that, the <?php and ?> at the $content. automatically turns into <!--php and -->. How do I call that gravatar (or any function) there at the $content?
There is no need to parse php in php. The function can just be executed the fist time: function myfunc($content) { $content.= '<span style="margin-top:10px" class="avatar">'. get_avatar(get_the_author_email(), 70).'</span>'; return $content; } PHP: