Support » Fixing WordPress » more tag with prosense
more tag with prosense
-
When I use the ‘more’ tag, it produces a ‘Read the rest of this entry >>’ link on the main post, but does not display the link when the post is reached via Categories or Search. I’m using the Prosense theme, so I switched themes temporarily to see if I was doing something wrong, but it displayed correctly in other themes. Is there a good reason why the link should not display in Prosense? If not, how can I fix it? Sorry if the answer’s obvious. Newbie here!
-
I guess the
more
function is not the same in your archives.php as in your index.php.It actually is working as intended right now.
In order to use the “more” tag and it’s settings you need to be using the_content within the loop to call your posts. ProSense actually uses the_excerpt for those pages. the_excerpt will only display an excerpt (the first 55 words) of your post rather than the whole thing so the more tag is a bit redundant with it.
My guess is that the folks at DoshDosh who put together ProSense were aiming at making those Search, Archive and Category pages a little more SEO friendly.
If you really want to change it it wouldn’t be too hard – but it’s not really necessary.
Thanks for your help. But I don’t follow your reasoning WildBil2Me when you say the more tag would be redundant. If a visitor to my site clicks on a category and is taken to a page with a short post (or posts) with just a couple of sentences, how do they know it isn’t just a short post? There’s no indication that there’s more to read if there’s no “Read more…”? Surely that’s just where the more tag IS needed?
hi darcy,
I didn’t mean that the more was redundant in general, just that it is when you use the_excerpt – and only in the sense of shortening your posts because the_excerpt shortens them automatically.
I actually use the more tag a lot and you’re right! It’s a great tool for showing the reader that there’s more to your posts than just what they see on the index, search, category, or archive pages.
ProSense is basically just using the_excerpt to cut down on “duplicate content” and keep those search, category and archive pages a bit quicker to navigate.
If you’d like to add the “Read more” link to those templates you can do it pretty easily – you would just need to edit a couple of your template pages. If you’re interested in doing this, and no one beats me to the punch, I’ll gladly post some code later.
I’m not at my dev machine right now so I’d hate to do it off the top of my head and be wrong.
Sorry for any confusion.
Thanks for the very clear explanation. I see the issue now. I can only have all the ‘read more’ links at the cost of increasing duplicate content.
Is there another way to add a link at the end of each exerpt, linking back to the full post – not to duplicate content?
If not, then, yes, I’d be grateful for the code you suggested, when you have time.
Thanks again.What we’re going to do is add a new permalink to the bottom of each post excerpt.
To do that you’re going to want to locate the_excerpt on archive.php and search.php (lines 42 and 22 respectively.)
Add a new line immediately after the line with the_excerpt and the closing </div>
You can see the code in this text file.
That ought to do the trick.
Now – if you’re post is longer than 55 words and you haven’t used a <!–more–> tag in it you’ll see […] to mark where the excerpt ends. If you have used the <!–more–> tag you won’t see that […].
Hope this helps.
sorry – dupe post
Can’t remember how to post code examples here lol.
Sounds like a good solution, but I can’t see any code in the linked text file.
This would be the code you’re looking for.
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the Rest of this entry »</a>
That works. However, “Read the Rest of this entry” now comes after all posts/exerpts, including short ones that don’t have anything more to read. Is there a way to make this solution apply only to longer posts? Or maybe add the link manually to individual posts?
The next option would probably be to just switch the_excerpt with the_content which would basically result in mimicking the index.php file across most of those templates.
On those template files simply replace:
<?php the_excerpt(); ?>
with:
<?php the_content('Read the rest of this post &racquo;'); ?>
You can also remove the code from the previous example.
What this will do is show the full content of all posts that don’t use the <!–more–> tag. But will show “Read the rest of this entry” for those posts that do – just like on the front page.
You might also consider just changing the text used in the previous example. If you went with “See the rest of this entry” or “See the full entry for this post” you’ll get more clickthroughs to individual posts.
I’m pretty sure the_excerpt doesn’t show pictures or non-text content so having the reader click through to the post (even if the full text is on those category / search pages) will give them a chance to see pictures, video or other content that may not be shown.
Hello WildBil2Me, I have the same problem than darcy2, i’m using Prosumer 1.4 by Nurudin Jauhari theme. I think this theme is using the_content within the loop to call my posts. I made all you said and now read the rest of this entry appears in the category pages, but the (more…) is still there, i have both.
Also i have the related post Aizatto’s Related Posts and the read the rest of this entry appears below of the related posts. This way:Archives for Tecnology
Hello (post title)
Hello this is a post…Bye. (post content)
(more…)
Related post
Related post 1
Related post 2Read the rest of this entry.
So what can i do for solve this? i want only the read the rest of this entry and before the related post. I don’t want the (more…).
Thanks for your help and i hope i can help you in the future.
- The topic ‘more tag with prosense’ is closed to new replies.