• My single.php code is written underneath. Just wanted to know how can I remove previous and next post links from all posts by editing the code?

    <?php
    /**
     * The Template for displaying all single posts.
     *
     * @package WordPress
     */
    
    get_header(); ?>
    
    	<!-- BEGIN PAGE -->
    	<div id="page">
    	<div id="page-inner" class="clearfix">
    
    		<div id="content">
    				<?php if(have_posts()) : ?><?php while(have_posts())  : the_post(); ?>
    					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    						<div id="post-title" class="clearfix full">
    							<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    						</div> <!-- end div .post-title -->
    
    						<?php /* option to activate featured image at the beginning of the post */
    						if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) && get_option('eted_post_img') == 'true' ) : ?>
    						<?php the_post_thumbnail('post-image', array('class' => 'imgthumb')); /* post thumbnail settings configured in functions.php */?> 
    
    						<?php endif; ?>
    
    						<div class="entry">
    
    							<?php the_content(); ?> 
    
    						<?php get_template_part( 'postmeta' ); // Post Meta (postmeta.php) ?>
    						<div class="space"></div>
    
    							<div id="nav-below" class="clearfix">
    								<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'eted' ) . '</span> %title' ); ?></div>
    								<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'eted' ) . '</span>' ); ?></div>
    							</div><!-- #nav-below -->
    
    							<?php wp_link_pages(); ?>
    							<!-- <?php trackback_rdf(); ?> -->
    
    						</div> <!-- end div .entry -->
    
    						<?php comments_template( '', true ); ?>								
    
    					</div> <!-- end div .post -->
    
    				<?php endwhile; ?>
    
    				<?php else : ?>
    					<div class="post">
    						<h3><?php _e('404 Error: Not Found', 'eted'); ?></h3>
    					</div>
    				<?php endif; ?>
    
    		</div> <!-- end div #content -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter rafiseo

    (@rafiseo)

    I really need the answer so I am bumping it.

    Hogan

    (@hnhoganlivecom)

    cmoment out or delete this part
    <div id=”nav-below” class=”clearfix”>
    <div class=”nav-previous”><?php previous_post_link( ‘%link’, ‘<span class=”meta-nav”>’ . _x( ‘←’, ‘Previous post link’, ‘eted’ ) . ‘</span> %title’ ); ?></div>
    <div class=”nav-next”><?php next_post_link( ‘%link’, ‘%title <span class=”meta-nav”>’ . _x( ‘→’, ‘Next post link’, ‘eted’ ) . ‘</span>’ ); ?></div>
    </div><!– #nav-below –>

    Thread Starter rafiseo

    (@rafiseo)

    Hey Hogan it works!! Many thanks mam. 🙂

    Thread Starter rafiseo

    (@rafiseo)

    I am marking this as resolved!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to Remove Next/Previous Post Links from Posts?’ is closed to new replies.