How to pull in new header with get_header in PHP?

Hey guys, I would love to pull in a custom header built in PRO - Headers into a PHP template but I’m not sure how or what to put in the perenthesis:

<?php get_header(); ?>

I can see that the head I want to use is “886” when I edit it (/x/#/headers/866/layout).

For some reason the CPT I created isn’t showing up in the Assignments Screen.

Thanks!
Matt

Hello Matt,

Thanks for writing in! You do not have to code anything to display the custom header in your CPT. Please assign a header globally and it will display in your CPT. If you simply want a specific header for the CPT, it should display in the assignment screen. Just filter it by typing the CPT name.

For example:

Hope this helps.

I’ve tried that. “Podcast” - my CPT doesn’t show up for some reason. Any ideas why?

Hello There,

I managed to check the following issue with the theme. It turns out that the custom header is only allowed to be assigned to a posts, pages and products. For indexes, archive pages and for custom post types is not supported yet. This feature will soon be available in the next future releases of Pro theme.

For the meantime, you will just have to assign the global header so that this will be used for your custom post types.

Thank you for your understanding.

Okay thanks for looking into that! That’s understandable. I’m assuming there’s no php file I can use to pull in one of these custom headers in PHP through get_header()? I can always copy the code for the custom header into a custom file and call it through get_header() in the mean time. I can’t use the global in my usecase because that has a transparent BG and is “absolute positioned” so it doesn’t look right.

Thanks!

Hello There,

All the custom header’s data is being saved in the database. The whole header itself is being displayed by the get_header() code. It loads the wp_head() and the head part of the page template with the condition to display the assigned custom header for each page. The condition accepts only to display either a post, page or product type. At the moment, there is no filter hook that you can use to add more type to it.

Thank you for your understanding.

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