Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Post signature showing on excerpt

Home / Forums / Virtue Theme / Post signature showing on excerpt

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
August 9, 2015 at 12:36 pm

Hello,

I’ve added a simple signature (forum, facebook & twitter link text) to the end of posts by adding the following to custom.php;

add_filter('the_content','add_signature', 1);
function add_signature($text) {
global $post;
if(($post->post_type == 'post'))
$text .= '<div class="signature">MY SIGNATURE HERE</div>';
return $text;
}

which is working fine, but it’s displaying on the blogroll/excerpt before ‘Read More’ and I just want it to display at the end of single posts. Is there any way to hide it from the excerpt, or a better way to add it to the end of every single post entry?

I know there’s a plugin for this, but the site is under heavy strain and I’d rather not use another plugin if I can help it.

Thanks,
David.

  • The forum ‘Virtue Theme’ is closed to new topics and replies.