Support » Plugin: TPG Get Posts » Latest Update showing Related posts

  • This was working very well, but the latest update seems to now include the ‘Latest Posts” sections from Yet Another Realted POsts plugin and Microkid’s related posts on the home page:

    Is there anyway to prevent these from showing? They were not previous to the latest update.

    I am using:
    [tpg_get_posts show_meta=”false” show_byline=”false” shorten_content=”w700″ numberposts=5]

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author cswaim


    These are difficult issues as there are 3 (?) plugins working on the home page display.

    Let me summarize my understanding of what is happening. The get_posts pulls the most current 5 posts. It displays them, suppressing the metadata. Then the Related Post plugin pulls in links to related posts (I am not familiar with this plugin) and a third plugin pulls in links to read more about…

    In looking at the individual post, it seems that there are imbedded shortcodes in the post which pull in the Read More About and Related Posts links.

    If these guesses are correct, then the shortcodes are being processed even though they reside beyond the shortened content.

    Please confirm that I understand the situation correctly.

    Yes I think you have the situation perfectly. Now to just figure out how to get those two other shortcode suppressed. I swear they were a couple days ago before an update.

    Plugin Author cswaim


    I have have tagged the 2.0.1 release (typo, should be 2.0.2) in WP and you can update to the previous version to get your site back to previous behavior.

    I will look at this, but it will take a couple of days to try a debug as I need to set up a test environment.

    Do you remember if you upgraded from 1.3.8 or 2.0.2 ? I released ver 2 in early November and it is a considerable restructuring of the code base and then added a feature to the premium version with the release last week.

    I just started using your plugin last week, so whatever was available then is what I originally installed.

    Hmmm….looks like I have 2.0.1 installed so I must have loaded it when it was 1.3.8. Was that still up last week when I first used it? I bet I was using 1.3.8. Can you give me a link to grab that one instead?

    I do have a BETA server if you need help working through debugging it but the two plugins showing are:

    Microkids Related Posts
    Yet Another Related Posts Plugin

    I love the ability to mix posts and other items on my home page so I love your plugin.

    Plugin Author cswaim


    Here is the link to access the archives:

    Thanks for the offer of the test site, I will try to set something on my site, but if I get stuck I might want to contact directly. Would you send an email: webmaster so I have a way to email you instead of cluttering up this forum.

    Thanks for the info, it really helps focus the debugging.

    Hi –
    I too love the simplicity and functionality of your plug in – thank you – I am having a similar issue – I only uploaded your program this morning and it says Version 2.01.00 – When I use the default shortcode (tpg_get_posts) on a page I get a call (2 calls) to another plug in’s shortcode which is not on the page – I use Navayan Subscribe and the page gets 2 calls to that code even though it is not in the page
    I would love to clean this up.
    Thank you again for your wonderful plugin.

    Plugin Author cswaim


    I have looked at the above mentioned plugins and in the case of the related posts plugins, they are hooking into the WP the_content filter and anytime it is called the related post is called. The plugin can be hacked to remove the filters before getting the post content, but then the code must be maintained. I am evaluating a way to allow custom functions to be called, but that feature is not available at this time.

    In the case of the Navayan Subscribe, that plugin is being invoked before the tpg_get_post plugin is called. This must be a setup issue with the plugin.

    Hi and thankyou for your reply – In the case of the Navayan Subscribe – what I described is not happening on any other page and only happens after I put in the shortcode to invoke the tpg get posts – so it is a puzzle why that is called even though not active on the page. On other pages and posts I do use a shortcode to embed the subscribe in the post, but not on the latest post page I am referring to. I even deactivated the navayan plugin and it still pulled the subscribe message – so I am not sure what might do that. Any ideas would be appreciated as it would clean up the page for me.
    ‘Thank you for your help



    I have a similar problem with my site, and came up with a workaround.

    My workaround will only work if you never intend to use tpg get posts and YARPP on the same page.
    On my site, I use tpg on my pages and only my pages, and yarpp only on the end of posts, so it works out just fine.

    Edit /tpg-get-posts/inc/class-tpg-gp-process.php Line 302
    $content = '<div id="tpg-get-posts" >';

    $content = ' <STYLE type="text/css">.yarpp-related {display:none}</STYLE><div id="tpg-get-posts" >';

    That’s it. Now when you call tpg get posts, it will inject the css to hide any yarpp addons.



    Cool!! Can you figure out a way to do this all in CSS without editing the files as I am sure your changes will be lost on an update.



    I tried putting it in the .css file, but the css file gets called on every page, so it was hiding the yarpp addons on posts where tpg wasn’t called.
    Maybe the author of the plugin can figure out a more elegant solution.

    Plugin Author cswaim


    I have been working on the plugin and may have uncovered the issue with the yarpp post. I hope to finish my testing and have some beta code available for testing. Is anyone available to apply the code change and test on their site?

    I am looking at when the content filter is applied. By moving this to immediately after the content section, the problem is not occurring on my test site. However, I really need a more robust test environment for this issue, so would appreciate an willing test case.

    You can post back here to let every one know that status, but send me an email directly.

    Timing: Hope to have the code ready to test by end of today.

    Plugin Author cswaim


    I released 2.2 today and on my test system the problem with related posts does not appear. I am marking this closed unless someone reports a problem after they upgrade.

    I am still seeing the YARRP entries showing when TPG is in use. Also The posts also have quickadsense entries in them which is now showing as well :/

    It works really well, I would just think it shoudl drop the other content that plugins put in below the post like YARRP and QuickAdsense.

    I can setup another test server for you if you want a place to mess with it. 🙂

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Latest Update showing Related posts’ is closed to new replies.