Archived topic
Showing newest post in full on index pages
16 replies · Started by Xuran on August 8, 2015
Hi there,
I'm wondering if it's possible to show the newest post in full on index pages (mainpage, category pages), and then having all other posts just showing content until the "more" break. I didn't find this function, so if it's not easy to do, then I guess this is a feature request :)
Thanks!
Xuran.
Hi Xuran,
Great question! Let me know look into this to see if I can find any functions that can make this happen for you :)
Will get back to you.
Great, Tom! And thanks for the quick reply!
Give this function a try: https://gist.github.com/generatepress/4eae715c9bd1da203d78
Be sure you have your Blog Content set to show the excerpt in "Appearance > Customize > Blog > Blog Content".
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Thanks Tom,
This works, but only when not using manually added "read more" tags. Not a big deal, and completely workable this way, but if there's a way to manually set the "read more" break while still having this functionality, I'd still be interested.
Anyway, thanks again for your quick response!
Xuran.
Currently, this is the only way to "trick" the post into showing the full content.
I'll look into this some more - I may have to add something into core to make this possible in the future.
Thanks!
Great, thanks again!
Hi Tom,
I'm still using the function you provided, and have run into a problem.
In Masonry mode, this function seemed to work great, showing only the newest post in full, however when clicking the "load more" button to load more older posts, the first newly loaded post is also shown fully, looking really weird.
Is there any way to fix this?
Thanks,
Edwin.
Hi Edwin,
Try this updated code: https://gist.github.com/generatepress/4eae715c9bd1da203d78
Great work Tom, that has it working perfectly,thanks a lot for sharing!
Glad it worked :)
Hi there, on the flip side, I cannot get my blog to stop showing full page on the blog post page. I have the setting set on Show Excerpt with 55 characters but still shows up full page on the blog post page.
I have Generate Blog 1.2.84 installed with license key.
http://damselsinthepress.com/blog/
I can send you login credentials if you are not able to view.
thanks in advance
There seems to be a maintenance page up.
If "Excerpt" is set, but the full post is showing, there's a couple things to check:
1. Is the "More Tag" added?: https://docs.generatepress.com/article/using-the-more-tag/
2. Is the "Post Format" meta box when editing the post set to something other than Standard?
Try this Tom. still couldn't get it to work
Still showing full post page on the blog page, @scratchingmyhead
Looks like your posts only have the word "Test" in them.
Looking at the HTML, they are set to use excerpts. Once more content is added you should see it work.