Landmark header for custom post types

Hello,

I am using X theme using the renew stack with a 3rd party plugin that creates custom post types. My problem is that archive pages for the custom post types don’t display a landmark header. I have already found that the file _landmark-header.php is the problem because it doesn’t generate any output for non-single custom post type pages. In thread https://theme.co/apex/forum/t/display-custom-post-type-custom-category-name-in-x-theme-archive-page/1620 you suggested to copy and modify that file.
Couldn’t you add a hook which makes it easier for child themes to customize the header without the need the copy/overwrite core theme files (which will potentially break with future updates).

For example, right now I solved the problem by adding the following block to _landmark-header.php, line 98:

<?php elseif ( is_archive() ) : ?>
  <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>

This way, I get a proper default title already, and I can easily add a filter for “x_option_x_renew_blog_title” to customize the header in my child theme.

I would love to see that (or something similar) being added to the core X theme so that I don’t have to copy/modify the file myself (and others could benefit from it as well.

The same should apply to the ethos and integrity stack as well.

Best regards
Daniel

Hi Daniel,

Thanks a lot for your suggestion, I’ll make sure to pass this one onto the team.

Have a great day!

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