Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #55069
    Crystal Jones

    I created a custom template called single-campaigns.php. It is in my child template folder (boldgrid-hifidel-child). This is the code in my custom template:

     * The core template of a BoldGrid theme.  If there's no home template
     * then this template gets used.  One of two required WordPress files.
     * @since 2.0
     * @package Prime
    if ( ! have_posts() ) :
    get_template_part( 'templates/content', 'none' );
    if ( is_archive() ) :
    get_template_part( 'templates/entry-header', 'archive' );
    while ( have_posts() ) : the_post();
    get_template_part( 'templates/content', get_post_type() !== 'post' ? get_post_type() : get_post_format() );

    Following the instructions on this post:, I added the following code snippet (using the Snippets plugin) to disable the sidebars:

    function my_custom_theme_configs( $boldgrid_framework_configs ) {
      $boldgrid_framework_configs['template']['sidebar'][] = "is_single";
      $boldgrid_framework_configs['template']['sidebar'][] = "[single-campaign.php]is_page_template";
      return $boldgrid_framework_configs;
    add_filter( 'boldgrid_theme_framework_config', 'my_custom_theme_configs');

    My sidebars are still in place. I am stuck what to do to remove the sidebars for my custom template.

    Brandon C

    Hi Crystal,

    Thanks so much for reaching out and thank you for using the BoldGrid Hifidel theme with BoldGrid Post and Page Builder for WordPress!

    Can you please send us the URL to one of your pages where you are using your custom template. We’d like to inspect the page just make sure that it is recognizing the custom post type. It’s possible that your code is correct but WordPress is not is not loading the new post type properly.

    You also want to check that your Crio child theme is your active theme and not Crio itself.

    We look forward to assisting you further with this!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘How Can I Disable The Sidebar Only For A Specific Custom Template?’ is closed to new replies.