Fixing the Read More Tag Problem in WordPress Static Pages

WordPress has two ways of showing excerpts in a blog. One is by using the_excerpt() tag in your themes, and the other method is by using the more tag. The more tag allows you to specify where the cut off point is in a post while writing a post which makes it easy for the editor and allow you to show teaser content and such. However the more tag is used only on the home page which shows the latest posts. It does not work in Pages. Recently we encountered this issue and thanks to the WordPress forums we found the solution. If you want to turn on the read more tags in pages for showing partial posts, use the following code inside the loop:

Comments

Ok, I’m a real WP beginner and this is my issue: on my static home page my blog posts are shown as excerpts, which is exactly as I want it and when you click on one of the posts, it displays the entire blog post which great again. BUT when I click on my categories, it shows all the relevant blog posts in it’s entire length and I want the posts to show as excerpts as well. How on earth do I do that? Would this code fix that? And if so, (and here it comes) where do I put it (reading the comments below I’m almost afraid to ask :))

I am trying to put a read more… link to my Home Page. However, I can see that the above code worked well in one specific page. But I can see that it is not making any changes on the home page. I am using flexibility 3 theme. Can you please help?

Also this code would only be needed if you are using page-template to display an archive of other posts. In that case, you would need to paste the code inside the loop. This is an intermediate level tutorial meant for theme designers.

O.K., I see, this concerns only archives, but what about regular pages, sometimes I publish long stories and I would like to offer only a glimpse at the start of the page and with “read more” to evoke the rest of the content. What is the remedy in this situation? What files should I look for? Thanks in advance.

Hey there, I used this fix and it worked….but now the snippet of my post that would’ve been cut off attaches itself to the bottom of the post, and Continue reading doesn’t create and excerpt, it just places a link and continues onto the full post. Any suggestions? Thanks!!

The problem with too many people will to make a blog post is when they decide to give people advices half of their explanation is missing. If a person knew nothing about wordpress and wanted this to work for him or her, how would what you’ve written help them?
If you really wanted to help people you’d take the time to explain where the code has to be written and how you get to where the code is written.

Bob, sorry that you think we are being arrogant, but hopefully this response will clarify our first response.

The file that you will paste the code in will vary from one person to another. This problem will only occur when you try to create a “custom page template” where you want to display other posts with content teasers. This functionality is NOT needed in most cases because WordPress has various ways to display archives (i.e categories, tags, dates). Only in custom cases, you will want to have this functionality.

It is impossible for us to determine what you are going to call your custom page template file. It could be joes-infinity-content.php for all that matter.

Furthermore, this is not for beginners. Because in order for you to run into the issue we are trying to solve in the post above, you have to learn how to do few other “code” related things (i.e create a custom page template, and know how to use the loop to display a list of posts on that page). By the time you have done all that, then you would know exactly which file you need to put the code in, and exactly where the loop is.

This problem does not exist by default. The fact of the matter is that a beginner will NOT have this issue to begin with unless you do the two other dev things. Hopefully that makes sense.

Not sure if you read the comment reply we had for Bob. This is not for beginners. Because in order for you to run into the issue we are trying to solve in the post above, you have to learn how to do few other “code” related things (i.e create a custom page template, and know how to use the loop to display a list of posts on that page). By the time you have done all that, then you would know exactly which file you need to put the code in, and exactly where the loop is.

This problem does not exist by default. The fact of the matter is that a beginner will NOT have this issue to begin with unless you do the two other dev things. Hopefully that makes sense.

Guess the website domain name threw me off, “wpbeginner.com” I thought perhaps this website would explain wordpress PHP in a way that a “beginner” could understand. I do use HTML5 and CSS3 so I am not a complete novice. I would like to learn how to design WP too.

So perhaps you could clarify, is ” something in one of the templates in Appearance>Editor?

I have read in WordPress docs that the “read more” is not offered by default in pages, but is available for landing pages. Since the “read more” attribute is available in my landing page editor, I have applied it and see it in my text editor I need to understand why it doesn’t display when I refresh the page.

A page is actually a single post in itself. The more tag, is supposed to be used to display an excerpt from an entry and then display a link back to full entry. However, when a user is already on a single page then the more tag will not work because the page will by default show the full content.

However, if you are using a custom template then you can get the more tag to work by adding this code in your custom landing page template:

You are not using it properly. This trick will not work when you try to show the content of page X on Page X. This trick will only work when you are trying to display excerpts of Page X on Page Y. Hope that helps.

Hi there I left a comment yesterday trying to get help on the “read more” tag. I left a link to my site but think maybe you deleted my comment because you thought I was hoping for a backlink…

I truly need help with this so will try again with no website address… when I add the code to domain.com the “continue reading” link does appear on my page and the content ends where it is supposed to but when I click on “continue reading” the additional content does not appear…

I am sure I am just missing a step somewhere but cant figure it out… could you please help me understand how I get the rest of the content to show up once the link is clicked???

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Get 20% off the visually stunning WordPress themes by Themefuse. View this Deal »

About WPBeginner

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).