WordPress.org

Support

Support » Themes and Templates » Hemingway Theme – Previous Next links

Hemingway Theme – Previous Next links

  • Just started using wordpress and am using the Hemingway theme (
    http://warpspire.com/hemingway/).

    The theme is great – but I having trouble how to add Next Previous post links at the bottom of the page – since they are there by default.

    Any help would be appreciated.

Viewing 15 replies - 1 through 15 (of 17 total)
  • drewactual
    Member

    @drewactual

    are you saying you want them and they are not there? Or they are there and you don’t want them?

    If they are not there and you want them, the easiest thing to do is go copy the php from a theme that has them and paste them in yours where you want them. If you want rid of them just delete the php snippets..

    drewactual

    They are not there and want to add them in. Just tried the code from the classic theme:

    <?php posts_nav_link(‘ — ‘, __(‘« Older Posts’), __(‘Newer Posts »’)); ?>

    But – it did not take me anywhere. Suggestions?

    drewactual
    Member

    @drewactual

    send a link and let me peek….

    but while I wait on that, how about putting that snippet in a defined field- like:

    <h1><?php posts_nav_link(' — ', __('« Older Posts'), __('Newer Posts »')); ?></h1>

    Check it out:

    drewactual
    Member

    @drewactual

    « Older Posts Newer Posts »

    that is there, that is what you wanted, right?

    Yes – the link shows up – and no – it does not navigate througth all the posts correctly. It keeps linking to the same page?

    drewactual
    Member

    @drewactual

    oh.. let me play… I was thinking that was all of your posts and that was the reason.

    drewactual
    Member

    @drewactual

    try:

    <?php next_posts_link('&laquo; Previous Entries') ?>
    <?php previous_posts_link('Next Entries &raquo;') ?>

    Same result:

    I am editiing code with “Main Index Template” index.php

    <?php get_header(); ?>
    
    	<div id="primary" class="onecol-stories">
    		<div class="inside">
    			<?php
    				// Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
    				query_posts('showposts=5');
    			?>
    			<?php if (have_posts()) : ?>
    				<?php $first = true; ?>
    				<?php while (have_posts()) : the_post(); ?>
    					<div class="story<?php if($first == true) echo " first" ?>">
    						<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    						<?php $hemingway->excerpt() ?>
    						<div class="details">
    							<?= _('Posted at') ?> <?php the_time('ga \o\n ' . $hemingway->date_format(true) . '/y') ?> | <?php comments_popup_link('no comments', '1 comment', '% comments'); ?> | Filed Under: <?php the_category(', ') ?> <span class="read-on"><a href="<?php the_permalink() ?>">read on</a></span>
    						</div>
    					</div>
    					<?php $first = false; ?>
    				<?php endwhile; ?>
    <h1><?php next_posts_link('&laquo; Previous Entries') ?>
    <?php previous_posts_link('Next Entries &raquo;') ?></h1>
    		</div>
    			<?php else : ?>
    
    				<h2 class="center">Not Found</h2>
    				<p class="center">Sorry, but you are looking for something that isn't here.
    
    				<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    			<?php endif; ?>
    
    			<div class="clear"></div>
    	</div>
    	<!-- [END] #primary -->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Maybe my placement of the code is incorrect?

    drewactual
    Member

    @drewactual

    huh…

    change your permalinks structure under your admin panel and see if the problem follows it…

    Changed it to month and name and problem still is still there.

    drewactual
    Member

    @drewactual

    change it to standard or default or whatever the term is, if that isn’t it- I’m lost too. Out of curiosity, how many posts do you have?

    btw- I am trying to determine if it is a permalinks issue, which some servers don’t like for some reason…

    There are 26 posts.

    Thanks for the help.

    I’m trying to do the exact same thing. I adding in the line of code, they show up fine, but when you click on them the same page shows up. It doesn’t bring up older posts. Anyone have any ideas?

    I don’t know the Hemingway theme, but if it has a query to pull in content (like in the index.php file, and it has something like “query_posts” or “$something = new WP_query(yadda stuff here)” before the loop, then the Next previous posts will not work. That’s a downfall of using queries to pull in other content.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Hemingway Theme – Previous Next links’ is closed to new replies.