• Resolved michael351

    (@michael351)


    Hey,
    I’m new with wordpress and I’ve installed the Customizable Post Listings plugin, but I have some problems with it.
    When I wanna display my post on home.php he repeats the headlines 10 times, something like this:

    recent posts
    06/09/2005: post1
    06/07/2005: post2
    06/06/2005: post 3

    Recent Posts
    06/09/2005: post1
    06/07/2005: post2
    06/06/2005: post 3

    And this is my code:
    <?php
    get_header();
    ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post”>

      Recent Posts
      <?php c2c_get_recent_posts(20); ?>

    </div>

    <?php comments_template(); // Get wp-comments.php template ?>

    <?php endwhile; else: ?>
    <?php _e(‘Sorry, dat konden we niet vinden!’); ?>
    <?php endif; ?>
    <?php wp_pagenavi()?>

    <?php get_footer(); ?>
    <br><br>

    Anyone know what’s wrong and can help, please?

Viewing 1 replies (of 1 total)
  • Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    You’re calling the plugin from within “the loop”. Basically in the above you’re telling it to list the 20 most recent posts, doing so once for every post you have WP set to list (probably 10, as you mentioned the recent posts listings as being repeated 10 times). If you really want to use the above setup, don’t include the post loop:

    <?php if (have_posts()) : ?>

    <div class="post">

    Recent Posts
    <?php c2c_get_recent_posts(20); ?>

    </div>

    <?php else: ?>
    <?php _e('Sorry, dat konden we niet vinden!'); ?>
    <?php endif; ?>

    However, since you aren’t defining any customizations to the function call, you probably just want to use regular WP template tags.

Viewing 1 replies (of 1 total)

The topic ‘Problems with Customizable Post Listings Plugin’ is closed to new replies.