SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict CWebguy's Avatar
    Join Date
    Mar 2009
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wp-Pagenavi not working

    When I follow the directions for the Wp-Pagenavi Plugin, I place the code

    Code:
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    in the footer.php, but the page navigation appears at the very bottom of the screen. Am I missing something?

    The link is http://www.top-country-videos.com if it matters.

    Thanks for any help!


    Update: I sort of getting it working by placing the code in the navigation area, but this isn't in line with what the directions for installation say at http://lesterchan.net/wordpress/readme/wp-pagenavi.html so if anyone has experience with this, please help me out, thanks.

    I will remove the footer code for the time being even though the instructions say that the code has to go there.

    Thanks.
    Last edited by CWebguy; May 24, 2009 at 20:35. Reason: update

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The footer isn't the only place you can put the code, it's just that Lester can't write less generic instructions or they wouldn't work in all themes. You can probably put the code anywhere that isn't within The Loop.

  3. #3
    SitePoint Addict CWebguy's Avatar
    Join Date
    Mar 2009
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks Dan, so it is ok to place anywhere? I will assume so based on your answer.

    Thanks.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,040
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    I think it depends on what theme you're using. For example, the footer.php file that comes with WordPress in the Classic theme
    PHP Code:
    <?php
    /**
     * @package WordPress
     * @subpackage Classic_Theme
     */
    ?>
    <!-- begin footer -->
    </div>

    <?php get_sidebar(); ?>

    <p class="credit"><!--<?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by <a href='http://wordpress.org/' title='%s'><strong>WordPress</strong></a>"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?></cite></p>

    </div>

    <?php wp_footer(); ?>
    </body>
    </html>
    Is different than the footer.php file that comes with WordPress in the Default theme
    PHP Code:
    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    ?>

    <hr />
    <div id="footer">
    <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. -->
        <p>
            <?php bloginfo('name'); ?> is proudly powered by
            <a href="http://wordpress.org/">WordPress</a>
            <br /><a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a>
            and <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>.
            <!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->
        </p>
    </div>
    </div>

    <!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/kubrick/ -->
    <?php /* "Just what do you think you're doing Dave?" */ ?>

            <?php wp_footer(); ?>
    </body>
    </html>
    And third party themes are likely to vary even more.

    I'd say put it where you need to and style it accordingly. Validate the page to make sure you didn't break tag nesting and you should be fine.

  5. #5
    SitePoint Addict CWebguy's Avatar
    Join Date
    Mar 2009
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd say put it where you need to and style it accordingly. Validate the page to make sure you didn't break tag nesting and you should be fine.
    Ok, I'll run it through a page validator, thanks a bunch.

    By the way, they need to include this plugin in Wordpress, it's pretty good!

    Thanks,

  6. #6
    SitePoint Member pathmaker's Avatar
    Join Date
    May 2009
    Location
    Arizona
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about in your template index page, I always put that code there.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •