WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Facebook - Advanced Social SEO for Facebook, Google+, Pinterest, Twitter & More
[resolved] Social Media Buttons Not Appearing in Excerpt (20 posts)

  1. Pharaoh145
    Member
    Posted 1 year ago #

    Hi,

    I am currently using the free version and am experiencing a problem.

    The social buttons appear on my post but not in the excerpt (which is what i really need).

    Here is a link to the page with the problem.
    http://flowsocietylacrosse.com/blog/

    Thanks in advance for your help.

    http://wordpress.org/plugins/nextgen-facebook/

  2. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    That looks like an index page. You'll have to enable the "Include on Index Webpages" option.

    js.

  3. Pharaoh145
    Member
    Posted 1 year ago #

    Hi JS,

    Thanks for the speedy reply. (wow!)

    I enabled the "Include on Index Webpages" option and experiencing the still the same issue.

    Anything else you think might be the problem?

  4. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Have you flushed the cache?

    js.

  5. Pharaoh145
    Member
    Posted 1 year ago #

    Yessir, using the "Clear all cache" button on your plugin's admin area. Also in my browsers.

  6. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Hm. Well, it could be one of two things, and after some digging, I found that it could also be an oversight on my part. ;-)

    The buttons are hooked into a filter called 'the_excerpt', which is similar to 'the_content'. Almost all developers know about 'the_content' filter, but very few know about 'the_excerpt'. This is fine when a developer uses the built-in WordPress functions, like the_excerpt(), which filters the text automatically. But when they access the text directly, they can sometimes forget to run the filters on it.

    So, one possibility is that they're accessing the excerpt text directly from $post->post_excerpt and forgot to apply the filters.

    After some digging, I found that the WordPress built-in function get_the_excerpt() runs a 'get_the_excerpt' filter, and not 'the_excerpt'. And of course, to make things all standard, a 'get_the_content' filter does NOT exist. :-p

    So, to recap, if your theme uses $post->post_excerpt, your template(s) will have to be updated to use apply_filters('the_excerpt') on it.

    I have to look into hooking into 'get_the_excerpt()', which is tricky because text can get filtered twice that way. Give me an hour and I should have a new version of the plugin for you to test.

    js.

  7. Pharaoh145
    Member
    Posted 1 year ago #

    JS, you're the man.

    Incredibly, with all the reading I have done in the last 24 hours I actually get some of what you mean.

    Thanks again.. Look forward to testing it out.

  8. Pharaoh145
    Member
    Posted 1 year ago #

    Hi Again JS,

    Here is a link to another dev's solution to the same issue on their plugin (Column Posts) some months back, in case it helps you in any way.
    I stumbled upon this last night in my search.

    http://wordpress.org/support/topic/facebook-like-button-in-excerpt?replies=6

    I implemented it and it worked, but placed the button (Facebook only) below the title and before the text (i want the buttons after the text).

    So although it technically worked, I restored my functions.php and header.php since it wasn't doing what i actually needed. Upon more searching I came to your page.

  9. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    30 more mins.

    js.

  10. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Well. That took a wee bit longer than expected.

    It turns out that the output from 'get_the_excerpt' is re-filtered through 'the_excerpt', which has a bunch of interesting filters from WordPress that add paragraph breaks, etc., which screwed up the social buttons HTML. :p So I had to code *another* filter for 'the_excerpt' just to fix the HTML after all the other filters had been applied. ;-)

    After all this, I really hope your theme uses get_the_excerpt() and not $post->post_excerpt. ;-)

    You can download v6.14dev1 from http://downloads.wordpress.org/plugin/nextgen-facebook.zip.

    Give it a go, and let me know if that fixes things for you. If not, then you'll have to modify your template(s). It's pretty straight-forward, you can just change this:

    $post->post_excerpt

    To this:

    apply_filters('get_the_excerpt', $post->post_excerpt)

    And that should do it. ;-)

    js.

  11. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    BTW, once you have things working, don't forget to leave a review (if you have 2 minutes to spare). ;-)

    http://wordpress.org/support/view/plugin-reviews/nextgen-facebook

    Thanks!

    js.

  12. Pharaoh145
    Member
    Posted 1 year ago #

    Reading up on your manual install instructions right now. Im still one of those WP Admin install guys..

    thanks for your help and effort sincerely.

    Will keep you posted..

  13. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    If you downloaded the NGFB Open Graph+ plugin as an archive file -- either the Pro version or from WordPress.org -- follow the Automated Removal (if NGFB Open Graph+ is already installed) and the Semi-Automated Install methods to remove, install, and activate the new plugin. Please take care to check the "Preserve on Uninstall" option on the Advanced settings page before removing the plugin (as explained in the Automated Removal procedure).

    ;-)

  14. Pharaoh145
    Member
    Posted 1 year ago #

    got it. thanks!

  15. Pharaoh145
    Member
    Posted 1 year ago #

    JS,

    Works perfectly now man. Thanks so much for your immediate attention to my problem.

    Now, since this plug in is the answer to my needs I have a new question (not problem) to ask...

    WP asked me to disable 2 conflicting plugins when I first installed yours.

    One was FACEBOOK (official plugin) which links my posts to the Facebook page so the posts appear there at the same time. I think I saw a feature in yours that also does this? (so i won't need FB plugin anymore)

    The other was WP SEO plug in.

    Im assuming because your plugin handles this things?

    Any insight?

  16. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    The Facebook plugin does a bunch of stuff, along with (mediocre) Open Graph meta tags. The problem is there's no option to turn off it's meta tags, so the whole plugin must be deactivated.

    WordPress SEO can also add (minimal) Open Graph meta tags. Luckily Yoast offers a way to disable the Open Graph feature, so you can use the rest of the plugin.

    NGFB Open Graph+ Pro actually ties-in nicely with WordPress SEO.

    js.

  17. Pharaoh145
    Member
    Posted 1 year ago #

    JS,

    I hate to be a pest...

    But..

    I didn't realize that when NGFB Open Graph+ is activated, it makes the entire sidebar on the blog page disappear. When I deactivate, it comes right back.

    Any thoughts?

  18. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Have a look at "Debugging and Problem Solving" in the Other Notes: http://wordpress.org/plugins/nextgen-facebook/other_notes/

    js.

  19. Pharaoh145
    Member
    Posted 1 year ago #

    Once again... right on the money.

    Humble Thanks!

  20. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Np. ;-)

    js.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.