Skip Navigation

[Resolved] Custom Post Header

This thread is resolved. Here is a description of the problem and solution.

Problem:

Is there a way to create a Custom Post Header, i.e. a and post title (Post Title field) with the Featured Image as background?

Solution:

The post header area is controlled by your theme file, see WordPress document:

https://developer.wordpress.org/themes/basics/template-files/#common-wordpress-template-files

If you want to display the post title and featured image insider post content area, you can setup the HTML codes manually, like this:

https://toolset.com/forums/topic/custom-post-header/#post-1495689

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-post-featured-image

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by AlexV7701 5 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1495175

Is there a way to create a Custom Post Header, i.e. a and post title (Post Title field) with the Featured Image as background?

Is there a block with this function?

Or perhaps this can be achieved with a content template? (are there any examples?)

Many thanks for your help,
Terry

#1495689

Dear Terry,

The Toolset Blocks and content template works only in post content area, for example WordPress default theme 2020, it is area of HTML div tag:

<div class="entry-content">
...
</div>

They do not work in post header area.

In most cases, the post header area is controlled by your theme file, see WordPress document:
https://developer.wordpress.org/themes/basics/template-files/#common-wordpress-template-files

If you want to display the post title and featured image insider post content area, you can setup the HTML codes manually, like this:

<div style="background-image: url([wpv-post-featured-image output ="url" size=full]);">[wpv-post-title]</div>

More help:
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-post-featured-image
hidden link

#1506711

Thank you for your very helpful reply, Luo. It put us on the right track!

#1506713

Thank you!