Support » Plugin: Better Related Posts » [Plugin: Better Related Posts] No results with custom loop

  • I love this plugin so far but can’t get the custom loop from the Readme to work. It always shows “No related posts…” even though <?php the_related(); ?> right next to it works fine and shows a list of posts.

    Here it is:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    When I do print_r($scores), it does show a full array with post IDs and scores. Why doesn’t the loop work?

    http://wordpress.org/extend/plugins/better-related/

Viewing 7 replies - 1 through 7 (of 7 total)
  • I have the same problem with the custom loop and I can’t find the problem.<?php the_related(); ?> is working fine.

    Here’s the code form the readme file: http://pastebin.com/bNB8vzQd

    Did anyone get this to work?

    http://wordpress.org/extend/plugins/better-related/

    I am having the same issue

    the_related() works but i want to control formatting so I tried custom loop code with no results

    Okay I got this to work by adding “post_type” in to the args

    here’s my code that’s working http://pastebin.com/mM56y8CU

    adambundy

    (@adambundy)

    @abrudtkuhl, passing in post type worked! Thanks!

    jmetzger631

    (@jmetzger631)

    Anyone have any luck getting the ordering to work properly? With this type of loop the results are not ordered by score. Which makes it kind of useless. So if you have 20 possible pages and 2 of them score really high, they may not even show up in the results at all if you are only displaying 5 results. Right?

    Nicolas uses an example in his read me text of how to make it work with this type of loop, but I can’t make sense of it.

    http://www.nicolaskuttler.com/code/order-posts-in-a-wp_query-manually/

    Can anyone make this work properly? Nicolas can you follow up that post with an example of working code. I don’t understand, wrapping in a class and get rid of my global? I would really appreciate it. Thanks.

    Plugin Author nkuttler

    (@nkuttler)

    Hm… yeah, the plugin should definitely be able to do this. I’ll see that I add this in the near future.

    jmetzger631

    (@jmetzger631)

    Thanks, I would really appreciate it. Otherwise this plugin is awesome. Would I be able to achieve the same thing using the code from your example page on your site?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Better Related Posts] No results with custom loop’ is closed to new replies.