WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] YARPP Not showing on Pages Admin (13 posts)

  1. marikamitsos
    Member
    Posted 2 years ago #

    Hello,
    I have NOT seen this mentioned before. Everyone is talking about related posts not showing on the front (theme dependent).
    I can NOT see the related posts NEITHER on the Pages Admin OR the front of our site.
    YARPP works as expected though for posts.
    Is this normal behavior? Because I thought that after version 3.2.1
    the bug was fixed
    . And I do have the "cross-relate" turned on.
    I use wordpress multisite 3.2.1, activating YARPP 3.3.2 on a per site basis

    Please advise. Thank you in advance.

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    This is actually a common question in these forums. You'll want to add the related_posts() code to your single page template.

  3. hinduismfacts
    Member
    Posted 2 years ago #

    Hi Mitcho, I also have the same problem.

    By single page template, do you mean single.php or page.php?

    I need to add related posts() or related posts();

    Thanx in advance.

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Probably page.php, if you want to display it on pages. related_posts(), yes.

  5. hinduismfacts
    Member
    Posted 2 years ago #

    Hi Mitcho, thanx for your response.

    I put related posts() in page.php template but still it is not working for pages.

  6. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    @hinduisimfacts do you get a "no related posts" display, or nothing at all? If you're getting nothing, you're most likely not placing the related_posts() code in the right place. Make sure it's near the_content().

  7. hinduismfacts
    Member
    Posted 2 years ago #

    Hi Mitcho, I am getting nothing in pages. I could not find the_content() in page.php. Here is the code of page.php:
    ___________________________________________________________________
    <?php
    /**
    * The template for displaying all pages.
    *
    * This is the template that displays all pages by default.
    * Please note that this is the WordPress construct of pages
    * and that other 'pages' on your WordPress site will use a
    * different template.
    *
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    */

    get_header(); ?>

    <div id="container">
    <div id="content" role="main">

    <?php
    /* Run the loop to output the page.
    * If you want to overload this in a child theme then include a file
    * called loop-page.php and that will be used instead.
    */
    get_template_part( 'loop', 'page' );
    ?>
    </div><!-- #content -->
    </div><!-- #container -->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    _______________________________________________________

    Can you tell me where exactly should I copy the code?

  8. hinduismfacts
    Member
    Posted 2 years ago #

    I found the code the_content() in loop-page.php. I pasted related_posts() there but it didn't show up.

  9. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Is it displaying "no related posts" or nothing at all? You can also paste in your loop-page.php code here so others can view it.

  10. hinduismfacts
    Member
    Posted 2 years ago #

    It is displaying the code itself like "related_posts()." I have changed the theme to twently eleven and using child theme for it now.

  11. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    You'll have to wrap it with php tags, like <?php related_posts(); ?>. Hope that helps.

  12. Savita
    Member
    Posted 1 year ago #

    I am using YARP plugin to display related post with post content, my code is
    ,
    function related_post_box($content){
    $rpost = related_posts(array(),false);
    return $content.$rpost ;
    }

    add_filter('the_content', 'related_post_box');
    ,

    But I am getting error even on 2011 theme "FATAL ERROR: MAXIMUM FUNCTION NESTING LEVEL OF '100' REACHED, ABORTING! IN \WP-INCLUDES\SHORTCODES.PHP ON LINE 231"

    Can you help me on this.

    Thanks

  13. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    @savitasoni calling YARPP from within the_content is unsupported. You'll want to call related_posts() from outside the filter the_content.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic