- This topic has 23 replies, 5 voices, and was last updated 8 years, 9 months ago by
Tom.
-
AuthorPosts
-
May 12, 2015 at 6:33 am #107369
rtomc
Hi,
How to display the featured image below the title in single post?
Thanks.
rtomc
May 12, 2015 at 8:52 am #107417Tom
Lead DeveloperLead DeveloperUsing the Page Header add-on, go to “Appearance > Customize > Page Header”.
Then set the “Single Post Header Position” to “Below Title”.
August 2, 2016 at 7:59 pm #215006Raymundo Ycaza
As simple as that! many thanks!
August 2, 2016 at 11:44 pm #215049Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
May 31, 2017 at 7:03 am #326598dale
Is there a way to change this post by post? For one of my categories (category-3), I want the Single Post Header Location to be Above Content Area, but in the rest I want it Inside Content Area.
May 31, 2017 at 8:58 am #326671Tom
Lead DeveloperLead DeveloperYou could try this:
add_filter( 'option_generate_page_header_settings','tu_dynamic_page_header_position' ); add_filter( 'option_generate_blog_settings','tu_dynamic_page_header_position' ); function tu_dynamic_page_header_position( $options ) { if ( in_category( 'category-3' ) ) { $options[ 'post_header_position' ] = 'above-content'; } return $options; }Adding PHP: https://docs.generatepress.com/article/adding-php/
May 31, 2017 at 11:17 am #326725dale
Thanks! I’ll try it.
Btw, Does the “dynamic” part mean that the non-Category-3 posts will match whatever I set in my customizer for Featured images?
May 31, 2017 at 3:11 pm #326822dale
I added it in Code Snippets, cleared my caches and Cloudflare, and used incognito, but it doesn’t seem to work.
How it looks:

How I want it to look:

The header is actually always the same in these posts, so if it’s easier to write it that way (to always put the same header on top of these posts), that works for me too.
May 31, 2017 at 6:55 pm #326886Tom
Lead DeveloperLead DeveloperCan you link me to the post in question?
May 31, 2017 at 7:40 pm #326904June 1, 2017 at 12:07 am #327024Tom
Lead DeveloperLead DeveloperWhat’s the exact code you’re using?
June 1, 2017 at 6:48 am #327153dale
I pasted in the code you gave me in Code Snippets. I have the featured image set as the page header using the checkboxes that appear on the editing page after activating that option in GP.
June 1, 2017 at 10:29 am #327259Tom
Lead DeveloperLead DeveloperYou’ll need to change
category-3to the name of your category:chechnyaJune 1, 2017 at 1:21 pm #327342dale
Ah. Thank you. I’m a newbie at PHP, and apparently this is another of the many things that makes PHP different from CSS. Neat!
And it works now. 🙂
June 1, 2017 at 7:14 pm #327479Tom
Lead DeveloperLead DeveloperGlad I could help 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.