- This topic has 7 replies, 3 voices, and was last updated 3 years, 10 months ago by Tom.
-
AuthorPosts
-
June 20, 2020 at 2:45 am #1335110Joey
I have recently migrated themes to premium GeneratePress and am running it off a child theme. I am having a couple errors when working in the post editor. If I change a post to any other format other than “standard”, such as “image,” “video,” “quote,” etc., the blog feed displays the image with the entire post. In other words, instead of just showing the image with an excerpt below it, or an image, or whatever it is supposed to do, it shows the image with the entire post below it.
There is a similar issue with “Disable Elements.” When I try to disable a certain element with the editor, such as the header, the post preview does not display the changes. If, however, I publish or update the post, then the elements are disabled correctly.
These are the only two issues I am finding. I mention them both in this post in case they are related, but the first issue is really what is affecting my ability to manage the site. Thank you.
June 20, 2020 at 5:16 am #1335213DavidStaffCustomer SupportHi there,
by default WordPress only provides the excerpt for the Standard Post format.
We provide this filter to enable it for other requirements:https://docs.generatepress.com/article/generate_show_excerpt/
You can use this code to enable excerpts on all formats:
add_filter( 'generate_show_excerpt', function( $show ) { if ( 'standard' !== get_post_format() && ! $show ) { return true; } return $show; } );
The Disable Elements issue – if this is related to an old themes template then i am unsure of the easiest way to cure that. Ill pass on to Tom.
June 20, 2020 at 9:50 am #1335567TomLead DeveloperLead DeveloperThe preview thing is a WordPress issue, as it’s not good at previewing post meta. It can either save post meta or not, and post meta isn’t saved when you preview a post (or else it would show on the live post). There might be some ways around it, but I’m not sure – I’ll do some digging.
June 20, 2020 at 4:51 pm #1335809JoeyWell my issue is that, for example, if I want to show just a photo in the blog feed, in my old theme I could just go to the editor and select “Post Format: Image”. And then it would show the image in the blog feed without an excerpt. If I wanted an excerpt, I could just select “Post Format: Standard” which is the default anyway.
What happens now is that “Post Format: Standard” works just fine. But if I want the feed to only show an image, instead it displays the entire post.
This might just be a wordpress issue, not a theme issue. I’m guessing then that the only way to get rid of the excerpt (or do quote, video, etc.) in the feed is to use CSS?
June 20, 2020 at 4:56 pm #1335815JoeyTo Tom,
No big deal about the preview, as that is more of a design element than something one uses a lot when creating posts on a live site. I was just confused because I was designing a section of the site from a page I was working on and then the preview wasn’t showing the removed elements. Took me a good 30 minutes to figure out a simple solution like clicking on “update”. As there were a couple bugs in the editor, I though I would ask about them together in case it is something related. Thanks for your help.
June 21, 2020 at 10:33 am #1336508TomLead DeveloperLead DeveloperWe don’t do anything special when it comes to the post formats, as that aspect of WordPress never really took off. Grabbing an image only requires some code that isn’t super performance-friendly.
What I would suggest is using the more tag in your image posts: https://docs.generatepress.com/article/using-the-more-tag/
That will make it so you can insert the tag after the image, and only the image will display in the excerpt.
Otherwise, there is likely a function/filter we can utilize if you’d like.
Let me know ๐
June 23, 2020 at 10:16 pm #1339702JoeyThank you to both of you. The more tag would would work, I didn’t think of that. To David, sorry if my question wasn’t clear, you’ve been a lot of help. Thanks again, JC
June 24, 2020 at 10:03 am #1340513TomLead DeveloperLead DeveloperGlad we could help ๐
-
AuthorPosts
- You must be logged in to reply to this topic.