• Hi,

    YARPP appears twice on the post: before the share icons and before the footer. I use pressroom theme. I ask the theme support for this and this is their answer:

    —————
    This YARPP plugin will add ‘related news’ section everytime the the_content() WP method is triggered.
    Now in the Pressroom theme the problem occurs, because single posts are displayed using ‘Single post template’ page, because of that we’re triggering the_content() WP method twice. In that case you can see the ‘related news’ section once before the pagination and the second time before the footer.
    It would be necessary to edit the plugin and disable the option to add sections on the_content() method, now in the theme files it would be necessary to include some code from YARPP plugin to show this ‘related news’ section in only one place.
    I’m not familiar with this plugin, so I don’t know what is the appropriate code to do this. You would need to contact plugin support and ask for help, maybe there’s a shortcode or simple function PHP function that can do this.
    ————–

    You can see an example on this page: https://www.ebizlatam.com/16-terminos-importantes-del-big-data-profesional-ti-saber/

    Can you help me with this?

    Thanks in advance,

    –Jose

Viewing 6 replies - 1 through 6 (of 6 total)
  • I see only 1 instance so I assume what you did worked.
    What did you do to fix it ?

    Thread Starter jchama

    (@jchama)

    Hi Beee,

    No, i can’t make it work. You can see the two instances of YARPP, the first one right before the share tools and the second one just after the comment form and before the footer.

    Sadly I have no solution yet.

    I do see it now… I did fix it (for my site) in the meanwhile. I do need to mention I’m not using the same theme as you, I’m using one which I wrote myself.

    I am using function related_posts('', false, false ) and it works for me.

    • This reply was modified 8 years, 1 month ago by Beee.
    Thread Starter jchama

    (@jchama)

    Hi Beee,

    Where did you put function related_posts(”, false, false ) ?

    In which file and where in it?

    Thanks in advance,

    –Jose

    I added it manually in (the equivalent of) single.php, instead of letting the plugin add it ( at the end of the_content() ).

    Basically you add the function manually to your single template where you want it to appear. Manual is the key here I think.

    @beee

    Is there a manual code reference in the docs somewhere? I’m trying to move them to a sidebar instead of at the bottom but not sure what the manual code is.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Duplicated YARPP on post’ is closed to new replies.