WordPress.org

Ready to get started?Download WordPress

Forums

The code to have the navigation on the index page (2 posts)

  1. psychederic
    Member
    Posted 5 years ago #

    Hi , thank you for this great theme.

    I have a solution for the navigation (nothing's impossible ):

    In order to change/navigate though pages in the index.php (page), we must replace at the top of index.php :

    <?php
    $options = get_option("widget_sideFeature");
    $posts = get_option('uwc_number_posts');
    $paged = intval(get_query_var('paged'));
    if($paged == 0) {
    $paged = 1;
    }
    if (is_active_widget('widget_myFeature')) {
    $category = "showposts=".$posts."&cat=-".$options['category']."&offset=".(($posts)*(1-$paged))."&paged=".$paged;
    } else {
    $category = "showposts=".$posts."&offset=".(($posts)*(1-$paged))."&paged=".$paged;
    } $x = 1;
    ?>

    THEN copy the default navigation queries at the bottom :

    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','« Next Entries','') ?></div>
    <div class="alignright"><?php posts_nav_link('','','Previous Entries »') ?>
    </div>
    </div>

    And that should work :-)

    Magic !

    I will try to localise your theme in other languages ( if you are ok with this ?)

  2. c.bavota
    Member
    Posted 5 years ago #

    If you download version 2.4.4 I have implemented Previous and Next links on the front page.

Topic Closed

This topic has been closed to new replies.

About this Topic