Archived topic
Blog title and title image rendering issues
7 replies · Started by Richard on February 4, 2020
Hi,
I currently have an issue where individual blog posts have the following displayed at the top of each post:
D ), 'large', false ); $categories = get_the_category(); if ( ! empty( $categories ) ) { $cat_name = esc_html( $categories[0]->name ); } global $post ?>
and where the image is supposed to be displayed I get:
ID);?>
term_id ) ) . '">' . esc_html( $categories[0]->name ) . ''; ?>
The site has recently been moved to dedicated wordpress hosting so I have been in touch with the hosting company. They haven't been able to find anything that has gone wrong in the move but the suggest the problem might be related to the following files:
JDuploads/content.xml
JDuploads/content-1.xml
They don't suggest what might be wrong, however the naming of these files rings in bell in my head in that I have carried out a resizing of al the images on my site to improve performance which involved a lot of image reloading. Could I have broken something in these files from my upload actions?
Also all plugins have been deactivated to see if they were the cause but proved not to be.
This problem only affects the individual blog posts (all of them) as detailed above and which you can see from the link provided by clicking on any post.
I would be grateful for any assistance you can give to figure this out
Thanks
Richard
Hi there,
Try adding the PHP Snippet provided here:
https://docs.generatepress.com/article/generate_hooks_execute_php/
Then in Appearance > Elements edit each of the Hooks Elements and Check Execute PHP.
Thanks David, Could I just check, should the php be added using the code snippets plugin?
Thats correct
Hi David,
That worked thanks.
Please could you remind me how to change the image and title at the top of the main blog page?
Cheers
Richard
Hi there,
It looks like a Hook, perhaps? You might find it in "Appearance > Elements".
Let us know :)
Hi Tom,
I can see how to set the title that is displayed on the blog title with the blog hero element but I'm unable to see how to set the image.
I have marked this thread as resolved (as the original question was resolved) and I have opened a new support topic to keep it separate for future reference.
Thanks
Richard
Thanks Richard - have answered your new topic.
https://generatepress.com/forums/topic/how-to-set-the-blog-page-title-and-header-image-when-using-the-bold-theme/#post-1155135