• Resolved dadaogbegun

    (@dadaogbegun)


    My sincere appreciation goes to the author of this beautiful plugin. Nice project and tremendous reviews.

    Out of plugins out there that could do similar thing I chose this plugin obviously because of its simplicity and reviews.

    I think I must’ve been doing something silly for not being able to get it to work for me.

    WHAT I HAVE DONE:

    1. Installed the plugin, but there was no dashboard to manage settings.
    2. Used the basic shortcode <?php echo do_shortcode('[related_posts_by_tax]'); ?> on my content.php template file.

    RESULT:

    1. Related posts didn’t show/display on my post page.
    2. No other indication that it worked.

    QUESTIONS:

    1. Do I need to add maybe a block of codes to my function.php template, or any other thing else?
    2. Will the plugin not work if there is no related post to display?

    Thanks very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dadaogbegun

    (@dadaogbegun)

    MYSTERY DEBUNKED

    How I solved the mystery:

    1. I created a duplicated of my WordPress, just preferred it that way.
    2. Populated the test WordPress with themeunittestdata.wordpress.xml.
    3. Related Posts showed as expected.

    Findings:

    The plugin: Related Posts by Taxonomy won’t display if there’s related post.

    Enjoy!

    Plugin Author keesiemeijer

    (@keesiemeijer)

    Hello dadaogbegun

    Yes, it only shows if there are related posts. I’m glad you’ve got it solved ??

    You can show a “No related posts found” message (if you want) by adding this to your (child) theme’s functions.php file.

    
    // this will display the shortcode even if no results were found
    add_filter( 'related_posts_by_taxonomy_shortcode_hide_empty', '__return_false' );
    

    btw:
    consider creating a child theme instead of editing your theme directly – if you upgrade the theme all your modifications will be lost.

    Thread Starter dadaogbegun

    (@dadaogbegun)

    Thanks very much for your support. I can’t thank you enough.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Related Posts didn’t show using shortcode’ is closed to new replies.