Skip to content

Mstoic

  • Home
  • Start Here!
  • Best Deals
  • Facebook Tricks
  • Privacy
  • Resources
  • TOC
  • Tools
    • Web Tools
      • Stop Watch
      • QR Code Generator
      • Adsense Code Converter
      • Blogger Sitemap Generator
      • Difference Between Two Texts
      • Vacation Checklist
      • Twitter Symbols
      • Count Down
    • Investment
      • SIP Calculator
      • Power of Compounding
      • PPF Calculator
      • FD Calculator
  • About Us

2 Ways To Add Read More Link On WordPress

Editorial Team | December 28, 2013February 3, 2014 | Wordpress |

If you are using any blogging platform then you would have heard about the “read more” term. This is usually used on the homepage and the archive pages, where many articles (posts on WordPress) are listed, and every one of them has a “read more” link. Clicking on this link will take you to the complete article (single post on WordPress).

Most WordPress themes display the read more link by default. If unfortunately, your theme doesn’t, then you can add the read more link to your theme very easily.

Related Articles

  • Turn OFF Autosave In WordPress And Reduce Database Size
  • 4 Ways To Enable Gzip Compression In WordPress
  • How to Edit .htaccess File from WordPress Dashboard Itself
  • 15 Best SEO Tips for WordPress Blogs
  • Optimizing Database For WordPress Websites Automatically [Free Plugin]

Prerequisite

  1. Editing Functions.php file on WordPress

Adding Read More Link On WordPress

There are two ways of going about it. The first one is by copying a snippet of code in functions.php file, and the other one is by adding some code to all the files where you want the “read more” link to appear.

Method 1 (Easy)

Just paste the following code in your “functions.php” file and you will have the read more link on all the pages that use the WordPress Excerpt.

function excerpt_read_more_link($more) {     return $more . '... <a href="'. get_permalink($post->ID) . '" class="readmorelink">' . 'Read More' . '</a>'; } add_filter('the_excerpt', 'excerpt_read_more_link');

Method 2 (Advanced)

Add the below given code to all the PHP files (index.php, archive.php, author.php, search.php and others) where you want the “read more” link to appear. Make sure it comes just after the “the_excerpt();” call.

<a href="<?php echo get_permalink(); ?>" class="readmorelink"> Read More...</a>

The second method is for advanced user and gives the additional flexibility of using it on selected pages and not adding the “read more” link to all the index, archive, author, search and other pages. The “read more” link in both the codes is customizable as it has the “readmorelink” class.

Previous Post

How To Display Featured Image In RSS Feeds In WordPress

by Editorial Team

Next Post

WordPress Database Optimization - 5 Steps To Reduce WordPress Database Size

by Editorial Team

Tags
  • Add Read More
  • How To Add Read More On WordPress
  • WordPress Read More
Recommended Next
Google Authenticator for WordPress

Discussions

  1. Pankhuri
    February 7, 2014 at 13:34

    Finally I can add a read more link to my WordPress website

    Reply

Your Comment Cancel reply

Follow Us

Like us Follow us Follow us

Categories

  • Tricks (93)
  • Facebook (83)
  • Tips (76)
  • Windows (67)
  • Wordpress (39)
  • Android (38)
  • Internet (33)
  • Antivirus (30)
  • How To (29)
  • Webmasters (25)
  • Customization (25)
  • Downloads (21)
  • Utilities (21)
  • Gmail (20)
  • Windows 7 (19)

Related Articles

  • Reverse a String using StringBuilder