Header/Footer Display Conditions - Missing CPTs

In BeTheme 29.0.5, could Header and Footer → Display Conditions → Singular discover public custom post types the same way the Single and Archive template picker does?

The dialog calls mfn_get_posttypes('tax'), which hard-codes Pages, Posts, Portfolio and Offer, plus Products when WooCommerce is active. A public plugin-registered CPT is missing even though it appears in the Single/Archive picker. The fixed list can also show Portfolio or Offer when the corresponding post type is disabled in Theme Options.

I tested a theme patch that appends eligible types using Mfn_Builder_Helper::get_post_types() and hides Portfolio/Offer when they are unregistered. It adds an “All” option under each additional CPT and keeps the existing taxonomy choices. On the front end it resolves an explicit CPT rule before inheriting the Page rule and preserves per-post overrides. The save routine compiles include/exclude rules separately and clears them when conditions are rebuilt, so a removed rule restores the previous header.

On a 29.0.5 staging site I verified that the native Header picker lists the custom CPT and omits the disabled types. Local PHP checks against the patched theme code covered assigning and removing the CPT rule, exclusions, per-post override precedence and the Page fallback. Could this be added upstream? I'm happy to provide the diff.

Comments

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.