Related Posts Picker
Adding Capability to Show No Related Posts (1 post)

  1. michelet
    Posted 4 years ago #

    On this plugin's website, someone asked a number of questions. While I never could figure out how to add thumbnails (volunteer anyone?) I did figure out a way to make it default to no related posts if none are selected...

    Edit the file wp-content/plugins/related-post-picker.php.

    In my version it was line 187...

    	$numberposts = '';

    Change it to a number that you would never use; I used 100.

    	$numberposts = '100';

    Go down a few lines and before this line of code,
    echo '<div id="rpp_related">

    create an if statement like...

    if ($numberposts < 99) {

    (99 being one less than my chosen 100)

    Add a closing } on the last line of the file and you're all done.

    Hope someone finds this useful. And will hope someone figures out how to add thumbnails and offers to share it too.

    And, PS to the plugin designer, I hope you continue to build on this plugin. It's really great as it is but the suggestions made by Glyn would make it truly outstanding.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Related Posts Picker
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic