WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pagination, query_posts, and Equilibrium theme (9 posts)

  1. websta
    Member
    Posted 4 years ago #

    I've been struggling with a query_posts issue in the Equilibrium theme; multiple pages do not display posts.

    I've looked at many posts on the issue to no avail, including:
    - http://www.nerdmatic.com/2009/03/15/adding-paging-pagenavi-to-the-equilibrium-theme/

    - http://theodin.co.uk/blog/design/wordpress-pagination-wppagenavi-queryposts.html

    And many, many others to no avail. Here is my index.php code:

    http://wordpress.pastebin.ca/1859172

    Site is located here; to see problem, scroll down and click for Next or page 2: http://cuteeverything.com/

    Right now I have Previous/Next, WP-Pagenavi, and WP Page Numbers installed, and none work -- separately, with or without pretty permalinks.

  2. PBP_Editor
    Member
    Posted 4 years ago #

    How many posts do you have set to display on your blog pages

    In settings > reading

    Blog pages show at most, how many?

    Looks like pagination works for category archives

    http://cuteeverything.com/category/cute/

    Take a look at the category php file and see what the difference is between that and the index.php

  3. websta
    Member
    Posted 4 years ago #

    The main difference between archive.php and index.php is the homepage contains this additional section (below). What is the problem(s?) with the code?

    <div id="featured">
    <h2>Featured</h2>
    	 <!-- Edit Below -->
    	<?php query_posts('cat=ID&showposts=2'); ?>
        <?php while (have_posts()) : the_post(); ?>
        <div class="front-post">
        <div class="featured-post">
            <div class="featured-title">
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?>
    </a></h2>
            </div>
            <div class="featured-image">
                <?php image_attachment('image', 303, 231); ?>
            </div>
        </div> <!-- END Featured-post -->
        <div class="postMeta-featured"><span class="date"><?php the_time('F j, Y') ?></span><span class="comments"><?php if (function_exists('wpfp_link')) { wpfp_link(); } ?><!-- < ? p h p comments_popup_link('0', '1', '%'); ?> --></span></div> <div class="clear"></div>
         <div class="featured-content">
    	 <?php the_excerpt(); ?>
    	<p class="moretext"><a href="<?php the_permalink() ?>">Continue Reading...</a></p>
        </div> <!-- END Featured-Content -->
  4. PBP_Editor
    Member
    Posted 4 years ago #

    I installed the theme and followed the instructions on

    http://www.nerdmatic.com/2009/03/15/adding-paging-pagenavi-to-the-equilibrium-theme/

    I was able to get this to work on index.php

    I was getting some parse errors from that code from the nerdmatic site. There was a missing semi-colon and some fancy quotes that I changed to simple quotes

    Try copying and pasting this

    http://wordpress.pastebin.com/NfLNQanZ

    I think there might also be some conflicts between the pagenavi and pagenumbers.

  5. PBP_Editor
    Member
    Posted 4 years ago #

    There was a issue with the ellipsis rendering in

    <p class="moretext">">Continue Reading...</p>

    Fixed here

    http://wordpress.pastebin.com/cs3THFzS

  6. scribu
    Member
    Posted 4 years ago #

    Good job PBP_Editor.

    Notice though that wp_pagenavi() accepts only two parameters: $before and $after.

  7. websta
    Member
    Posted 4 years ago #

    Wow, PBP_Editor, you're the man! It works very well.

    Thank you, thank you, thank you. That was really a step beyond, and I appreciate it so much.

  8. websta
    Member
    Posted 4 years ago #

    For the future, if anyone wants to look at the code so graciously provided by PBP_Editor, it may be downloaded from: http://cuteeverything.com/Repaired_Equilibrium_with_Pagenavi_index.php.txt

    Thanks again!!!

  9. jacobsen1
    Member
    Posted 3 years ago #

    OK, first off, thanks for all the help so far, I have my categories working as well as my front page..... mostly.

    When I use this code on my front page, the FIRST page works perfectly. The link to the second page also works perfectly. But when I go to the second page there aren't any thumbnails for the posts?

    Also, how do I make my search results return with thumbnails like the category results do now?

Topic Closed

This topic has been closed to new replies.

About this Topic