facebook-loves-wordpress

Facebook Post Excerpt Showing Tags Instead of Post

We encountered a problem today when a customer brought it to our attention that the Facebook synopsis of their blog posts were only showing the featured image and the tags.  This was happening because the amount of space Facebook dedicates to each post did not provide a large enough area to show the content of the blog.

The easy solution was to move the entry-meta section that was currently to the right of the featured image, to the very bottom of the post content.  This way the information was still available if needed, but it would not take up the valuable real estate at the top of each blog post.

This site was built with WooThemes -For the cause theme.  After looking through single.php, we removed the following code from the top:

<aside class=”entry-meta”>
<ul>
<li class=”post-author”>
<?php the_author_posts_link(); ?>
</li>
<li class=”post-comments”>
<?php comments_popup_link( __( ‘Leave a comment’, ‘woothemes’ ), __( ‘1 Comment’, ‘woothemes’ ), __( ‘% Comments’, ‘woothemes’ ) ); ?>
</li>
<li class=”post-category”>
<?php the_category( ‘, ‘) ?>
</li>
<?php if ( has_tag() ): ?>
<li class=”post-tags”>
<?php the_tags( ”, ‘, ‘, ” ); ?>
</li>
<?php endif; ?>
</ul>
</aside>

And replaced it at the bottom of the file right above the following line:

<div class=”fix”></div>

Then with a quick CSS change we were able to take the new entry-meta information and make it the full width of the post.

.single .hentry .entry-meta {
width: 100% !important;
}

Of course your theme may vary slightly.

 

 

Share this!
No comments yet.

Leave a Reply