WordPress.org

Ready to get started?Download WordPress

Forums

Post pagination for customized Journalist theme (1 post)

  1. Devin Walker
    Member
    Posted 4 years ago #

    Hello all,

    I'm using an extremely customized version of the Journalist theme and would like to add pagination to my posts because some of them are just too long. To do this I understand you need to include something similar to:

    <?php wp_link_pages(array(’before’ => ‘<p><strong>Pages:</strong> ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>

    ...to you single.php file in the theme folder. And also the <!--nextpage--> where you want the content to cut off. Well, the content is cut off, but I don't see any pagination. I've added the code above to index.php and page.php with no luck either.

    Here's what I'm doing:

    <div id="content" class="group">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div id="title"><h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2></div>
    <p class="comments-page"><a href="<?php comments_link(); ?>"><?php comments_number('0','1','%'); ?></a></p>
    <div class="dateArticle">
    <span>
    <em>Posted:</em> <?php the_time('F jS, Y'); ?>
    <em>&nbsp;&nbsp;&nbsp;&nbsp;By:</em> <?php the_author(); ?>&nbsp;&nbsp;&nbsp;
    </span>
    </div>
    <div class="main">
    	<?php the_content('Read the rest of this entry &raquo;'); ?>
        <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong>', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    </div>
    <div class="meta group">
    <div class="tags">
        <p>Posted in <?php the_category(',') ?></p>
        <?php if ( the_tags('<p>Tagged with ', ', ', '</p>') ) ?>
    </div>
    </div>
    
    <!--<div class="navigation group">
        <div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
        <div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
    </div> -->
    
    <?php if ( comments_open() ) comments_template(); ?>
    
    <?php endwhile; else: ?>

    Can anyone help? My wordpress site is located @ http://www.dlocc.com/

    Thanks for any help in advace!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.