WordPress.org

Forums

[Plugin: Yet Another Related Posts Plugin] Restricting Related Posts by Author? (9 posts)

  1. zoen
    Member
    Posted 5 years ago #

    Is it possible to restrict/filter the display of related posts to that of a specific author only and if so, how? Thanks.

  2. @zoen, sorry, this isn't supported by YARPP.

    One thing you could do is write a custom YARPP template which only displays related posts if they are by certain authors... here's some more info on YARPP templates: http://mitcho.com/blog/projects/yarpp-3-templates/

  3. zestylemon
    Member
    Posted 5 years ago #

    The Widget Logic plugin might help you acheive this. I've used the plugin to only show YARRP widget when a post is in / not in specific categories.

  4. zoen
    Member
    Posted 5 years ago #

    Thanks both of you. I am using a custom YARPP template but I can't seem to fathom how to amend the $related_query to add the restriction of a post author. Anyone know how to do this or am I looking along the wrong lines? Mitcho how would you suggest I would amend the custom template?

    I'll have a look at the Widget Logic plugin but I think you may misunderstand, I am able to show YARRP where I want it, what I would like to do is restrict the related posts it displays to only one author. Thanks though.

  5. @zoen, the thing to do, as I understand what you're trying to do, would not be to modify the actual YARPP display logic, but rather to add code to check whether the current page is a page where you actually should display the results or not.

  6. Matt Minde
    Member
    Posted 4 years ago #

    Hello all! Very new at this, and Mitcho, I'm in the forums now. I would like to filter related posts display by category as well. I work for a newspaper, and it'd be depressing to see related posts for obituaries or the police blotter. How does one accomplish this? I'm intrigued by using Widget Logic, except that would get very complicated, setting up exceptions for each post. Any help? THANKS!

  7. @Matt, filtering related posts by category is already available. Just go to the YARPP settings and disallow related post results from those categories, like obits and police reports.

  8. Matt Minde
    Member
    Posted 4 years ago #


  9. Matt, I didn't get that last message... hope all is resolved. :)

Topic Closed

This topic has been closed to new replies.

About this Topic