Custom Post Type Template Override

Hello.

First of all thanks for a great Theme!

I am having trouble with overriding the post template of a custom post type. I have read through many of the forum post but to no avail.

Basically I have a post type called ‘wood-cabinets’ and these are the steps I have taken.

  1. Copied single.php from X and pasted it in the root folder of child theme.
    Renamed single.php to single-wood-cabinets.php
    Edited this line <?php x_get_view( x_get_stack(), 'wp', 'single' ); ?> to <?php x_get_view( x_get_stack(), 'wp', 'single-wood-cabinets' ); ?>

  2. Copied wp-single.php from X renew folder and pasted it in the renew folder of child theme.
    Renamed wp-single.php to wp-single-wood-cabinets.php
    Edited this line <?php x_get_view( 'renew', 'content', get_post_format() ); ?> to <?php x_get_view( 'renew', 'wood-cabinets', get_post_format() ); ?>

No matter what I cannot get it to work.

I can get the override to work in general not using the custom post type slug but not with the custom post type.

I have also tried using ‘wood_cabinets’ instead of ‘wood-cabinets’ but still nothing.

Assistance would be greatly appreciated :slight_smile:

Thanks!

Hi,

Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at pinnacle@theme.co if this is of interest to you. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

Thank you for your understanding.

Hi Paul.

Thanks for your message.

I would say though that this is related to an issue with the theme as I just need to know the settings for an template override I don’t have questions about developing the template.

So, comes down to setup of the template override of the theme not the customization of.

Hope you can assist.

Thanks!

Hello There,

Thanks for updating in! Sorry for the confusion. I am another staff checking this thread by the way. I will go back to your very first post. To resolve your issue please do the following steps:
For single-wood-cabinets.php file
1.) Copied single.php from X and pasted it in the root folder of child theme.
2.) Renamed single.php to single-wood-cabinets.php
3.) Edited this line <?php x_get_view( x_get_stack(), 'wp', 'single' ); ?> to <?php x_get_view( x_get_stack(), 'wp', 'single-wood-cabinets' ); ?>

For wp-single-wood-cabinets.php file
1.) Copied wp-single.php from X renew folder and pasted it in the renew folder of child theme.
2.) Renamed wp-single.php to wp-single-wood-cabinets.php
3.) You do not change anything. You will just need to change if you want to display other things aside from your custom post title and custom post content description.

The best example you could follow is how we have implemented the x-portfolio custom post type in the theme.

Hope this helps.

Hi RueNel!

Thanks for your message and I got it to work :slight_smile:

I do have a follow up question if you don’t mind.

Where do I override the x landmark breadcrumbs header for my custom post type archive?

Right now it has none.

You’re awesome thanks!

Copy _landmark-header.php located in x\framework\legacy\cranium\headers\views\yourstack to this folder in your child theme x-child\framework\headers\views\yourstack. The file contains conditional tags for different content types. You should create one for your custom post type.

Awesome Thanks! :slight_smile:

You are most welcome!