WordPress.org

Forums

WP Magazeen Theme Pagination (5 posts)

  1. subhadeepgayen
    Member
    Posted 6 years ago #

    Hi,

    I'm i'm using Magazeen theme which can be downlaoded here : http://www.smashingmagazine.com/2009/02/23/magazeen-free-magazine-look-wordpress-theme/ , the theme doesn't have any pagination or older post links, i tried adding all pagination plugins available none worked. If anybody can help me to integrate pagination or even just older post link i'll be thankful to him.

    Many Thanks For Reading.

  2. mbuhnici
    Member
    Posted 6 years ago #

    I have the same problem. Any solution?

  3. trekwolf
    Member
    Posted 6 years ago #

    I was having the same problem and found this post:
    http://wordpress.org/support/topic/221179?replies=4

    I added this tag <?php wp_link_pages(); ?> to my index.php and page.php files and page nummbering appeared. Just adding a plugin did not work for me either.
    Hope this helps

  4. ryanyockey
    Member
    Posted 6 years ago #

    I found a fix for the pagination of this theme. You can download my index.php file from the theme at my website.

    Magazeen Pagination Fix

  5. jackiepeters
    Member
    Posted 6 years ago #

    hey ryan, i couldn't get your code to work for me, but i had already moded and hacked it to the point that it's barely recognizable any more. what i did though was something like this, in case anyone else wants an alternate method. this actually works for pagination on any custom loop with query_posts. In the case of magazeen there are three queries with interdependent offsets, so it's math based on page number. i am not really a "coder" but i can make stuff work, so this may not be neat or elegant.

    The code below determines what page you're on and sets the offset as a variable based on the formula (pagenumber - 1) * n + y where n is number of posts you have on your page and y is the offset for each query in relation to the first post.

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $newpaged = $paged-1;
    $pagedi = strval($newpaged) * 11;
    settype($pagedi, "integer");
    query_posts( 'showposts=3&offset='.$pagedi );
    if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category();
    ?>
    
    //stuff here
    
    <?php
    endwhile;
    endif;
    ?>
    
    <?php
    $pagedj = $pagedi +3;
    query_posts( 'showposts=4&offset='.$pagedj );
    if (have_posts()) : $counter = 0;
    while (have_posts()) : the_post(); $category = get_the_category();
    
    if( $counter % 2 == 0 )
    $end = "";
    else
    $end = "last";
    ?>
    
    //stuff here
    
    <?php
    $counter++;
    endwhile;
    endif;
    ?>
    
    <?php
    $pagedk = $pagedi+7;
    query_posts( 'showposts=5&offset='.$pagedk );
    if (have_posts()) :
    while (have_posts()) : the_post(); $category = get_the_category();
    ?>
    
    //stuff here
    
    <?php
    endwhile;
    endif;
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic