WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] Display related posts from custom post types in selected pages only (3 posts)

  1. hormiganegra
    Member
    Posted 1 year ago #

    Hi!
    I want to display a list of related posts from a custom post type taxonomy in selected pages only. This example I think will explain it better:

    • In the Fruits page, I want to display related posts from the Fruits taxonomy of the custom post type Food
    • In the Vegetables page, I want to display related posts form the Vegetables taxonomy of the custom post type Food
    • In the Meat page, I want to display related posts form the Meat taxonomy of the custom post type Food

    But in other pages, I don't want any related posts listed.

    Is this at all possible? I guess it could be easy to do with shortcodes, but I saw in this thread that you're not planning to support them.

    Any advice will be welcome!

    Thanks

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    You can do this using some custom PHP, by loading yarpp_related() in your theme with the appropriate arguments. More information on developing with YARPP is in the readme.

    There are technical reasons why YARPP is difficult to run as a shortcode, so shortcode support will not be coming.

  3. hormiganegra
    Member
    Posted 1 year ago #

    Thanks! I'll see if I can make it work

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.