Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5500

    I’m using portfolios exclusively from now on. Is there a way to get the Related Posts feature to pick up related portfolios?

    Thanks for the help.

    #50574

    Hey,

    open up includes/related-posts.php and replace:

    $my_query = new WP_Query("tag=$tag_ids&showposts=$postcount&ignore_sticky_posts=1&orderby=rand");

    with:

    if( get_post_type() != 'portfolio' ){
    $my_query = new WP_Query("tag=$tag_ids&showposts=$postcount&ignore_sticky_posts=1&orderby=rand");
    }else{
    $my_query = new WP_Query("tag=$tag_ids&post_type=portfolio&showposts=$postcount&ignore_sticky_posts=1&orderby=rand");
    }

    #50575

    Thank you. It seems to have worked!

    #50576

    Glad that I could help you :)

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Related Portfolios?’ is closed to new replies.