I want to show following HTML code in the place of excerpt in WordPress. In original code WordPress use
return '...';
I want to add following PHP and HTML code on return:
<div class="share-icons-r">
<div class="share-r">
<h3>Share</h3>
</div>
<div class="icons-r">
<a target="_blank" href="http://www.facebook.com/share.php?u=<?php echo get_permalink();?>&title=<?php the_title(); ?>">
<img src="http://www.mywebsite.com/fb.png" />
</a>
</div>
</div>
Maybe following is the complete code of that function
if ( ! function_exists( 'x_excerpt_string' ) ) :
function x_excerpt_string( $more )
{
$stack = x_get_stack();
if ( $stack == 'integrity' )
{
return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>
</div>';}
else if ( $stack == 'renew' )
{
return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';}
else if ( $stack == 'icon' )
{
return ' ...';
}
else if ( $stack == 'ethos' )
{
return '...';
}
}
add_filter( 'excerpt_more', 'x_excerpt_string' );
endif;