Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #2345824
The Gem page options are not available for custom post types
Closed

Comments

  • joyceinc started the conversation

    I have installed the Gem and planned on using two plugins for and events calendar and sermon manager which create custom post types. When these custom post types are displayed, the page styling options don't seem to be available. For example, the settings for the header, padding for the page title, showing or hiding footer elements aren't available. I did change the settings for 'default page options for new pages, posts & portfolio items,' in the theme settings, but these don't seem to be applying to these custom post types. Do the theme settings not work with just these plugins or would this be an issue with any custom post type plugins? Any help would be greatly appreciated. Thanks!

  •  7,092
    Oliver replied

    Hi,

    you need to add your custom post types name in the file:

    /wp-content/thegem/thegem/inc/post-types/init.php

    line 25:

    $post_types = array('post', 'page', 'thegem_pf_item', 'thegem_news', 'product');
    

    For the safety future updates copy this function to the functions.php of the child theme, so the code will be:

    function thegem_add_page_settings_boxes()
        {
            $post_types = array('post', 'page', 'thegem_pf_item', 'thegem_news', 'product', 'YOUR_POST_TYPE_NAME_1', 'YOUR_POST_TYPE_NAME_2');
            foreach ($post_types as $post_type) {
                add_meta_box('thegem_page_title', esc_html__('Page Title', 'thegem'), 'thegem_page_title_settings_box', $post_type, 'normal', 'high');
                add_meta_box('thegem_page_header', esc_html__('Page Header', 'thegem'), 'thegem_page_header_settings_box', $post_type, 'normal', 'high');
                add_meta_box('thegem_page_footer', esc_html__('Page Footer', 'thegem'), 'thegem_page_footer_settings_box', $post_type, 'normal', 'high');
                add_meta_box('thegem_page_sidebar', esc_html__('Page Sidebar', 'thegem'), 'thegem_page_sidebar_settings_box', $post_type, 'normal', 'high');
                if (thegem_is_plugin_active('thegem-elements/thegem-elements.php')) {
                    add_meta_box('thegem_page_slideshow', esc_html__('Page Slideshow', 'thegem'), 'thegem_page_slideshow_settings_box', $post_type, 'normal', 'high');
                }
                add_meta_box('thegem_page_effects', esc_html__('Additional Options', 'thegem'), 'thegem_page_effects_settings_box', $post_type, 'normal', 'high');
                add_meta_box('thegem_page_preloader', esc_html__('Page Preloader', 'thegem'), 'thegem_page_preloader_settings_box', $post_type, 'normal', 'high');
            }
            add_meta_box('thegem_product_size_guide', esc_html__('Size Guide', 'thegem'), 'thegem_product_size_guide_settings_box', 'product', 'normal', 'high');
            add_meta_box('thegem_post_item_settings', esc_html__('Blog Post Settings', 'thegem'), 'thegem_post_item_settings_box', 'post', 'normal', 'high');
        }
        add_action('add_meta_boxes', 'thegem_add_page_settings_boxes');
    

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •   joyceinc replied privately
  •  7,092
    Oliver replied

    You're welcome!

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver