WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] If statement for YARPP? (4 posts)

  1. Dave P.
    Member
    Posted 4 years ago #

    How would I go about doing an if statement for

    <? related_posts() ?>

    This way if YARPP is deactivated it won't break my page...

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 4 years ago #

    Check using if (function_exists('related_posts')).

  3. Dave P.
    Member
    Posted 3 years ago #

    Thanks mitco, just what I needed! The full code I used for anybody else looking for this:

    <? if (function_exists('related_posts')) {
    						related_posts();
    					} else {
    						echo "No related posts";
    					} ?>
  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    Great!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic