Fixing Read More link appear on Blogger Fullpost
Thanks to Paul Escolar who really use my code on 'How to create expandable post summaries in Blogger' and spot a bug on that tutorial.
Hence my code for this blog is already changed for other additional stuff. Sorry for that silly mistakes . As I went to debug my tutorial, I found that whoever follow that tutorial properly will get the same result as Paul's blog. So, here is the explanation and how to fix it.
Please check at the last chunk of code on 'Step #1 - Edit your template code'. The old code should look like this:
where the previous screenshot is this:
What this code do is checking the 'more' label and put that 'Read More' link at the end of your post, regardless you are in fullpost or not. So, to wipe it out when we are in fullpost, you just have to add this two lines of code, before and after that code chunk:
In blogger layout code, the fullpost page type is called 'item'. So, this 'if statement' is added to check that we are not in 'item' post and only do loop through the labels and add the Read More links then.
That's it, you may save your template now and see the difference. Good Luck!!
Hence my code for this blog is already changed for other additional stuff. Sorry for that silly mistakes . As I went to debug my tutorial, I found that whoever follow that tutorial properly will get the same result as Paul's blog. So, here is the explanation and how to fix it.
Please check at the last chunk of code on 'Step #1 - Edit your template code'. The old code should look like this:
<b:if cond='data:post.labels'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name == "more"'>
<a expr:href='data:post.url'>...<b>Read more</b></a>
</b:if>
</b:loop>
</b:if>
where the previous screenshot is this:
What this code do is checking the 'more' label and put that 'Read More' link at the end of your post, regardless you are in fullpost or not. So, to wipe it out when we are in fullpost, you just have to add this two lines of code, before and after that code chunk:
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:post.labels'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name == "more"'>
<a expr:href='data:post.url'>...<b>Read more</b></a>
</b:if>
</b:loop>
</b:if>
</b:if>
In blogger layout code, the fullpost page type is called 'item'. So, this 'if statement' is added to check that we are not in 'item' post and only do loop through the labels and add the Read More links then.
That's it, you may save your template now and see the difference. Good Luck!!
You may also love to read:
Comments
do you have any tutorial in your blog on how to create a related article list between the post and comments?
I will put you in my favourites ;)
nice work man...
I don't have that tutorial yet. Hopefully, I have to create one for you.
brett.peace, thank you!
I must be a luddite... I have read & re-read your instructions including the update. And I am still having difficulties finding the "p> data:post.body/ tag... I found the data:post.body but there was no "p" in front of it.. what am I missing? thanks (sorry I couldn't use the <> part
Never mind! I kept fiddling with it and it appears to work. Wow. thanks!
data:post.body/
(your code)
clear for photos floats
/div
Tried it out, and it works fine.
One thing that momentarily threw me was the "more" label. You just add it to the "Labels for this post" input box on the "Create" or "Edit Posts" tab when you create or edit a post.
Very simple, and you covered it perfectly in you tutorial, but I was lost in CSS, thinking I had to add it in the html. Mais, non! I only reiterate it here in case others flake out similarly.
Bravo! Thanks.
-- Jim
(http://www.cyclopsvue.blogspot.com)
Is there a way of doing a "Read more" without using labels? I've seen it done elsewhere: http://www.ageofautism.com
THANK YOU VERY MUCH !!
I had been struggling with this all day, trying all different sites and running into the same brick walls. Then I came a cross your tutorial. By far the most clearly explained and exampled posting I've found. Almost worked first time, and was disheartend to view my blog, only to realize my failure yet again. I read your directions again and saw that i had missed to the step about adding the 'more' tag.
So now, accomplished and satisfied, I thank you, for I am going to sleep deeply contented tonight.
Youv'e got yourself another subscriber:)
I'd struggled to find the solution to this myself, but using labels just didn't occur to me. Well done!
Followed.
at first I would like to thank for the code. I used it and had the same issue with the "Read more" still showing up in the full post. Here I can see I could make it disappear. But do you think it is possible to have a link "Back to blog" instead? It would be a really nice feature. If it'd cause you too much work just forget it, I'll follow this instruction.
any suggestions?
If not, please check it out at How to create expandable post summaries in Blogger.
If you have done that, make sure you add 'more' tag on those post you want the 'Read More' link to appear.