WordPress.org

Ready to get started?Download WordPress

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 7 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 7 months ago by Andrés Sanhueza
  • This topic is not resolved
  • WordPress version: 3.8

Tags