• Resolved lost_and_confused

    (@lost_and_confused)


    I just uploaded a new theme called BFA Round Tabs 1.0 by Bytesforall. I just noticed that this theme does not allow readers to read older posts because there is no “previous entries” and “newer entries” link at the bottom. I tried adding a html code to get “previous entries” and “newer entries” links to show up at the bottom by adding the html code to the index.php. I succeeded getting the links to show up on the home page. However, I failed getting the links to show up in my categories/archive posts. If anybody could help me, I would be really grateful. Here is my site https://www.audreydao.com

    I also have another problem similar to the previous entries and newer entries. My Add This link will only show up on the homepage posts. It won’t show up on my posts in archive/categories.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I guess you have got as far as using this code for the links?

    <span class='older'><?php next_posts_link('&laquo; Older Entries'); ?></span>
    <span class='newer'><?php previous_posts_link('Newer Entries &raquo;'); ?></span>

    Have you also added the code to your archives.php file and page.php file as it is not present by default… (am assuming is the same issue for the ‘add this’ issue)…

    Hope that helps

    Thread Starter lost_and_confused

    (@lost_and_confused)

    Can I stick the code in anywhere I want in archives.php file and page.php file? Or is there a specific place?

    Thread Starter lost_and_confused

    (@lost_and_confused)

    i noticed that code is present in archives

    <?php get_header(); ?>
    			<div id="outer-column-container">
    				<div id="inner-column-container">
    					<div id="source-order-container">
    						<div id="middle-column">
    							<div class="inside">
    <?php if (function_exists('is_tag')) {is_tag();} ?>
    		<?php if (have_posts()) : ?>
     	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
     	  <?php /* If this is a category archive */ if (is_category()) { ?>
    		<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
     	  <?php /* If this is a tag archive */ } elseif( function_exists('is_tag') && is_tag() ) { ?>
    		<h2 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
     	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
     	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
     	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
    	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h2 class="pagetitle">Author Archive</h2>
     	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h2 class="pagetitle">Blog Archives</h2>
     	  <?php } ?>
    <?php if (function_exists('show_posts_nav') && show_posts_nav()) : ?>
    		<div class="navigation">
    				<span class='older'><?php next_posts_link('&laquo; Older Entries'); ?></span>
    				<span class='newer'><?php previous_posts_link('Newer Entries &raquo;'); ?></span>
    		</div>
    <?php endif; ?>
    		<?php while (have_posts()) : the_post(); ?>
    		<div class="post">
    				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if (function_exists('the_title_attribute')) {the_title_attribute();} elseif (function_exists('the_title')) {the_title();} ?>"><?php the_title(); ?></a></h3>
    				<div class="entry">
    					<?php the_content() ?>
    				</div>
    				<p class="postmetadata">Posted: <?php the_time('F jS, Y') ?> under <?php the_category(', ') ?>. <?php if ( function_exists('the_tags') ) {the_tags('Tags: ', ', ', '<br />');} ?><?php edit_post_link('Edit', '', '. '); ?><?php comments_popup_link('Comments: None', 'Comments: 1', 'Comments: %'); ?></p>
    			</div>
    <?php endwhile; ?>
    		<?php if (function_exists('show_posts_nav') && show_posts_nav()) : ?>
    		<div class="navigation">
    				<span class='older'><?php next_posts_link('&laquo; Older Entries'); ?></span>
    				<span class='newer'><?php previous_posts_link('Newer Entries &raquo;'); ?></span>
    		</div>
    <?php endif; ?>
    	<?php else : ?>
    		<h2 class="center">Not Found</h2>
    		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
    	<?php endif; ?>
    							</div>
    						</div>
    						<div id="left-column">
    							<div class="inside">
    <?php get_sidebar(); ?>
    							</div>
    						</div>
    						<div class="clear-columns"><!-- do not delete --></div>
    					</div>
    					<div id="right-column">
    						<div class="inside">
    <?php include ('sidebar2.php'); ?>
    						</div>
    					</div>
    					<div class="clear-columns"><!-- do not delete --></div>
    				</div>
    			</div>
    <?php get_footer(); ?>

    I don’t see it in page.php file

    <?php get_header(); ?>
    			<div id="outer-column-container">
    				<div id="inner-column-container">
    					<div id="source-order-container">
    						<div id="middle-column">
    							<div class="inside">
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<h2><?php the_title(); ?></h2>
    			<div class="entry">
    				<?php the_content('<p class="serif">More &raquo;</p>'); ?>
    
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    			</div>
    		</div>
    		<?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    							</div>
    						</div>
    						<div id="left-column">
    							<div class="inside">
    <?php get_sidebar(); ?>
    							</div>
    						</div>
    						<div class="clear-columns"><!-- do not delete --></div>
    					</div>
    					<div id="right-column">
    						<div class="inside">
    <?php include ('sidebar2.php'); ?>
    						</div>
    					</div>
    					<div class="clear-columns"><!-- do not delete --></div>
    				</div>
    			</div>
    <?php get_footer(); ?>

    Thread Starter lost_and_confused

    (@lost_and_confused)

    I changed my layout until I could get a solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add “previous entries” and “newer entries” to posts’ is closed to new replies.