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

  • The topic ‘Bypass some of the default settings one choses in the admin panel with templates’ is closed to new replies.