Add Landmark Header to Custom Post Types

I’m on X Theme Pro.
I use a custom plugin to create custom post types.

Those custom post types appear to be exempt from Landmark headers.
Moz SEO tools is reporting errors for missing H1 on all the custom post category pages.

https://usatcorp.com/faq-category/cradlepoint-managed-services/

I hide the category titles on my regular posts, but they are still there for search engines to crawl,

https://usatcorp.com/category/carrier-news/

How can i add the landmark header into the custom post type category pages?
I asked the plugin people, and of course, they said it’s a theme issue.

Thank you!

This is what they said “You’re going to need to review and revise your available archive/taxonomy template files in your current active theme to resolve this topic. We don’t have any control over the output on the front-end of a user’s site, and have no settings around this.”

The code auto-generated below is what i’d like to hijack and apply to the custom post categories.

  <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span>Carrier News</span></h1>
    <p class="p-landmark-sub"><span>Below you'll find a list of all posts that have been categorized as <strong>&ldquo;Carrier News&rdquo;</strong></span></p>
  </header>

but for it to say FAQs instead of posts in the p-landmark-sub

I tried adding this to my functions.php in my child theme work but it’s not a complete function

<?php elseif ( is_faq-category() ) : ?>

  <?php

  $meta     = x_get_taxonomy_meta();
  $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
  $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all faqs that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';

  ?>

  <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
  </header>

Hello Jesse,

Thanks for posting in! Just for future topics, self responding or bumping your post pushes it back in our Queue system so it takes longer to respond to.

Your php code is incomplete and invalid. There is no such is_faq-category() function exist. This condition will not work.

Keep in mind that 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. If you are not familiar with customization, it is best that you find a 3rd party developer to do the customizations for you.

To get you started with, we would highly recommend that since you are using Integrity stack, please copy the _landmark-header.php file from wp-content/themes/pro/framework/legacy/cranium/headers/views/integrity. You will have to upload this file into your child theme’s folder wp-content/themes/pro-child/framework/legacy/cranium/headers/views/integrity. Using the right condition, this is the right file and location where you can insert your custom post type landmark header.

Instead of using is_faq-category() which is not correct, you will have to use is_post_type_archive as a condition which you can learn more about in this codex:

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.

Regular Blog Category pages are regulated using the “is_post_type_archive” ? All of this seems wildly complicated for a simple addition of a header. Why would it be this difficult?

Hello Jesse,

Regular blog category pages is using this is_category(). You can learn more about it here: https://codex.wordpress.org/Conditional_Tags#A_Category_Page

For your custom post type archives, you will be using is_post_type_archive() as explained here: https://codex.wordpress.org/Conditional_Tags#A_Post_Type_Archive

Please understand that your custom post type were not supported in the theme. Adding a custom post type would mean to modify parts of the theme such as the landmark header to accommodate the custom post type category archive pages.

Thank you for your understanding.

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