• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPArena

WPArena

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

  • News
    • Opinion
  • Tutorials
  • Reviews
    • Themes
    • Plugins
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Services
WPArena » Tutorials
Tutorials

WordPress Post Navigation Looks Bad On Single Pages

Avatar of Editorial Staff Editorial Staff October 8, 2007

FacebookTweetPinLinkedInEmailPrint

You may have seen it on some blogs and maybe even your own: The navigation links to next and previous posts appear to be jumbled or even wrapped around each other looking terrible. This is usually in the WordPress default theme but can happen on other themes as well. This simple WordPress Guide will make your next and previous navigation links look much better in single posts.

To check your blog open a post in the loop that has posts before and after it. Here is a sample of good navigation links shown on the single post page or single.php:

If the links don’t look like they do in the above image the fix is quite simple. Open the single page template for your theme and find the below code. Simply place a break between the previous and next posts as shown in red text below. It may also be necessary to place another break at the very end of the code to push the post content down away from the navigation links. (not shown)

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”navigation”>
<div class=”alignleft”><?php previous_post_link(‘« %link’) ?></div><br>
<div class=”alignright”><?php next_post_link(‘%link »’) ?></div>
</div>

In order to edit your themes template files from the WordPress dashboard the proper file permissions(CHMOD) must be set in your blogs hosting account. Usually changing them to 666 is good enough to be able to edit them. The proper path to edit the theme’s files are your blog’s directory, the wp-content folder, themes, your theme. In that folder, you should at least CHMOD the single.php file or the entire folder if you want to change other files.

blog/wp-content/themes/CurrentTheme

At the WordPress dashboard go to Presentation, Theme Editor. Look on the right for single.php or the Single Post file. Click it, make your changes and click Update File on the bottom right. If you are uncomfortable editing these files and don’t want to render your blog useless you may want to make a backup copy of any file before you edit it.

To make a backup, copy the contents of the file and paste it into a text file on your computer and save it. Then should things go wrong just paste the original file back into the Theme Editor to restore its original state.

If you want me to customize or fix a specific problem with your blog Click Here to send me an email, you will find my fees are very reasonable.

FacebookTweetPinLinkedInEmailPrint

Related Stories

  • 10 Things to look for when Selecting a WordPress Theme

    10 Things to look for when Selecting a WordPress Theme

  • How To Customize WordPress 404 Error Page

    How To Customize WordPress 404 Error Page

  • 5 Simple Steps To Make Money As A Blogger

Avatar of Editorial Staff

Editorial Staff

Editorial Staff at WPArena is a team of WordPress experts led by Jazib Zaman. Page maintained by Jazib Zaman.

Reader Interactions

Share Your Thoughts Cancel reply

Before submitting your comment, we kindly ask that you read our comment policy. Your email address will remain confidential and will not be published or shared anywhere. If you subscribe, you will receive notifications regarding new comments.

Primary Sidebar

A set of devices to run online eCommerce store

What’s The Best Platform To Build an eCommerce Store?

bootstrap-ecommerce-business

A Beginner’s Guide to Bootstrapping Your First E-Commerce Business

Recent Topics

  • 27 Top SEO Companies in the World
  • 12 Ways To Monetize Your WordPress Blog
  • Comparing the Best Employee Engagement Software in the Market
  • Stellar Converter for OST Review: Best Tool for OST to PST Conversion
  • How To Use WordPress as an eCommerce Store

Footer

Top

  • Services
  • Our Themes
  • Facebook
  • Twitter
  • Linkedin

Reviews

  • Beaver Builder Review
  • Beaver Themer Review
  • WP User Frontend Pro
  • Ninja Forms Review
  • MemberPress Review

More Reviews »

Resources

  • Best WordPress Plugins
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files
  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact

Copyright © 2023 · All Rights Reserved · WPArena is a Project of TechAbout LLC.
We are not affiliated with Automattic or WordPress.

  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact
Share this ArticleLike this article? Email it to a friend!

Email sent!