Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Remove sidebars by default

This topic is resolved
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    Hello!
    I have created a CPT called “podcast” and the theme assigns by default a template with two sidebars (left and right) to both the cpt file page and the individual cpt page.
    I need this CPT to show the same template as for normal posts.
    How can I do it? Thanks in advance.

    Jean-Pascal
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 630 Posts
    @themopteryx

    Hi @wpnovatos,

    Thank you for bringing this to our attention.
    We will investigate further to find how to improve this.

    We will be back to you ASAP.

    Thank you for your patience.

    Regards,

    Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    It really is something very strange.
    The CPTs that I created after installing your theme do not respect the page template attribute when forced.
    Check what happens when you enter https://wpnovatos.com/podcast/episodio134/
    Keep holding a right sidebar and push it off the screen until it is placed under the content.

    All CPTs that were created before installing your theme, allow you to choose a page template, although the elements such as title, featured image, etc., are not displayed in the same place as the post template, which should be correct.

    Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    I have just discovered that the bar pushes it when you insert an image of a certain width into the content. Instead of adapting the image to the set width of the content box and displaying it in proportional size, push the bar out and modify the width of the content.

    If I remove the image, the right sidebar reappears in its position, but still, the CPT does not assume the structure of the posts, despite having cloned in single.php and renamed it to single-podcast.php

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2062 Posts
    @themosaurusrex

    Hi @wpnovatos,

    We’re sorry for the trouble you’ve been experiencing with this issue.

    Our theme and Grimlock are adding an extra layer to the standard WP template hierarchy to allow users to Customize their post archive and single post templates.

    Few PHP code lines might be required to make the single podcast fit the single post template. Do you wish to achieve the following layout? (Please see attached.)

    I want to be sure that I understand what you want to achieve. Could you provide us with screenshots of your website please? Please don’t hesitate to comment or highlight your screenshots to help us better understand your issue.

    Thank you.

    Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    Hi Olivier!
    Thank you for responding quickly.

    In summary, what I need is that the appearance of the individual entries of the CPT “podcast” be treated in the same way as the individual posts, which have the same appearance.

    And at the same time, that the archive page of the CPT “podcast” looks the same as the archive page of the posts (blog) instead of what is now displayed.

    I leave you some screenshots so you can see the differences that exist today.

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2062 Posts
    @themosaurusrex

    Hi @wpnovatos,

    Let’s set the single podcast first. To improve its display, simply add the following code snippet to your website:

    /**
     * Apply post settings to single podcasts.
     */
    function gwangi_custom_is_template( $is_template ) {
    	return $is_template || is_singular( 'podcast' );
    }
    add_filter( 'grimlock_single_customizer_is_template', 'gwangi_custom_is_template', 1000, 1 );
    
    /**
     * Add post styling to single podcasts.
     */
    function gwangi_custom_add_body_classes( $classes ) {
    	if ( is_singular( 'podcast' ) ) {
    		$classes [] = 'single-post';
    	}
    	return $classes;
    }
    add_filter( 'body_class', 'gwangi_custom_add_body_classes', 1000, 1 );

    To add this code snippet to your site, we recommend that you use a the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:

    Adding Custom PHP Without Changing Your Child Theme

    Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.

    Regards,

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2062 Posts
    @themosaurusrex

    Once done, could share a screenshot of your single podcasts please?
    Thank you.

    Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    Thanks Olivier!
    That really worked.
    Now single podcasts look the same as post single.
    That’s great

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2062 Posts
    @themosaurusrex

    Hi @wpnovatos,

    Good news! Do we need to improve your podcast archive now or do you wish to keep a different layout from the blog? And what exactly needs to change? I see a blank header for instance. Do you wish to add the archive title to the header?

    Thank you.

    Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    Hi Olivier!
    I need the CPT archive page to display the same as the blog posts, with the title “Podcast” and the same grid style. Thank you so much for all your help.

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2062 Posts
    @themosaurusrex

    OK, understood. Would please replace the previous code snippet with following please?

    /**
     * Apply post settings to single podcasts.
     */
    function gwangi_custom_is_template( $is_template ) {
    	return $is_template || is_singular( 'podcast' );
    }
    add_filter( 'grimlock_single_customizer_is_template', 'gwangi_custom_is_template', 1000, 1 );
    
    /**
     * Apply post settings to single podcasts.
     */
    function gwangi_custom_is_archive_template( $is_template ) {
    	return $is_template || is_post_type_archive( 'podcast' );
    }
    add_filter( 'grimlock_archive_customizer_is_template', 'gwangi_custom_is_archive_template', 1000, 1 );
    
    /**
     * Add podcast archive title to podcast archive.
     */
    function gwangi_custom_add_custom_header_args( $args ) {
    	if ( is_post_type_archive( 'podcast' ) ) {
    		$args['title']    = get_the_archive_title();
    		$args['subtitle'] = get_the_archive_description();
    	}
    	return $args;
    }
    add_filter( 'grimlock_custom_header_args', 'gwangi_custom_add_custom_header_args', 1000, 1 );
    
    /**
     * Add post styling to single podcasts.
     */
    function gwangi_custom_add_body_classes( $classes ) {
    	if ( is_singular( 'podcast' ) ) {
    		$classes [] = 'single-post';
    	}
    	return $classes;
    }
    add_filter( 'body_class', 'gwangi_custom_add_body_classes', 1000, 1 );

    It should give you the desired layout. (Please see attached.)

    Cheers,

    Juanma Aranda
    Participant
    • 3 Topics
    • 11 Posts
    @wpnovatos

    Hi Olivier!

    Thank you for all of your help. Now it looks great on my site.

    As a suggestion for an upcoming theme update, there should be an option in the customizer to choose a layout for the CPTs and their archive pages.

    Greetings!

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2062 Posts
    @themosaurusrex

    Hi @wpnovatos,

    Thank you for the great feedback! ?
    We’ll think about it and find the best way to implement this feature.

    Cheers,

    Manathan
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 5135 Posts
    @themodactyl

    Hi @wpnovatos,

    We have just released a new update of Grimlock. Updating this plugin to the latest version should fix this issue.

    After the update, the problem should now be fixed. However, you might still be seeing the issue because your browser cache is showing you an older version of the page (browsers do that to load pages faster). To see that the issue is resolved you will need to empty your browser cache and reload the page. If you want to read more on what browser cache is and how to clear it, here is an article that might help you:
    https://www.lifewire.com/how-to-clear-cache-2617980

    Kindest regards,

Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Remove sidebars by default’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Turn Your Cera-Powered Website Into a iOS and Android App

15% discount for users of themosaurus theme

To operate the full power of the Cera theme, we have partnered with the Zipline team. Your community website can now be turned into your own custom app for iOS and Android.

We got you an incredible discount!