WordPress.org

Forums

Yet Another Related Posts Plugin (YARPP)
Bypass some of the default settings one choses in the admin panel with templates (1 post)

  1. Andrés Sanhueza
    Member
    Posted 1 year ago #

    Example of one of the default template code one of the widget uses:

    <?php if (have_posts()):?>
      <ul class="related-post-loop">
      <?php while (have_posts()) : the_post(); ?>
      <?php if (has_post_thumbnail()):?>
      <li><figure><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('post-main-thumb'); ?><figcaption><?php the_title(); ?></figcaption></figure></a>
      </li>
      <?php endif; ?>
      <?php endwhile; ?>
      </ul>
    <?php else: ?>
      <?php endif; ?>

    I modified it a bit to have a more custom looking widget, including filtering by post type. One thing I can't get, however, is to have it showing a different number of posts than the one specified on the settings, among other things. I believe one uses WP_Query for that, but it don't seems to work here.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags