How to Add PHP to Pro Theme's Header Builder

Hi

I’d like to be able to use a post (or page’s) featured image in the Pro theme’s Header Builder but can’t work out how to do it - can you tell me whether that’s even possible with the Pro theme and, if not, is it going to become possible at a later date?

Thanks for your help and time in advance…

Hi There,

First, please add this code under functions.php file locates in your child theme:

add_shortcode('thumbnail', 'thumbnail_in_content');

function thumbnail_in_content($atts) {
    global $post;

    return get_the_post_thumbnail($post->ID);
}

After that you can user [thumbnail] shortcode to your header builder.

Hope it helps :slight_smile:

Hi Thai

That’s useful but maybe I didn’t explain myself well enough!

I’d like to be able to create headers like this:
https://www.celciun.com/facebook-marketing-dos-and-donts/

But, instead of using the ‘only Facebook in focus’ image (obviously, added manually) for each post I’d like to be able to set the header to use (& maybe crop) the featured image where the ‘only Facebook in focus’ is.

Is that even possible?

If it is, then I’m guessing there’s a way of adding the post title to appear in the header (and styled using the header builder) as well as other details, such as Advanced Custom Fields data that is attached to a post, page, or custom post type?

Thanks for your help so far and for any help you’re able to give me to do this…

Jon

Hi There,

Thanks for the clarification!

The feature you are looking unfortunatly not available in header builder. This is something need custom development and which is beyond our theme support scope.

Thanks for understanding!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.