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.

Change ‘category’ template to minimal

This topic is resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    How to shift the category to be minimal template.

    Tried changing the ‘posts page’ but did nothing.

    Thanks in advanced 🙂

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @abourne,

    When you say Minimal Template, do you wish to remove the Header -displayed in blue on your site- from the category page to only display the page title? (Please review attachment.)

    Currently, this Customizer option doesn’t exist yet. However, we could send you the PHP code snippet required to do so.

    Thank for your reply.

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    I would like to remove the Header – displayed in blue on site- from the category page to only display the page title.

    Please share PHP snippet.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @abourne,

    Here it is:

    /**
     * Hide the Custom Header for all pages.
     *
     * @param  array $args The array of arguments passed for the Custom Header.
     *
     * @return array       The updated array of arguments passed for the Custom Header.
     */
    function gwangi_custom_hide_custom_header( $args ) {
      if ( is_category() ) {
    	$args['displayed'] = false;
      }
      return $args;
    }
    add_filter( 'grimlock_custom_header_args', 'gwangi_custom_hide_custom_header', 1000, 1 );
    
    /**
     * Remove the CSS classes to the body for the Custom Header for all pages.
     *
     * @param  array $classes The array of CSS classes to the body for the Custom Header on minimal templates.
     *
     * @return array          The updated array of CSS classes to the body for the Custom Header on minimal templates.
     */
    function gwangi_custom_remove_body_classes( $classes ) {
      if ( is_category() ) {
        unset( $classes[ array_search( 'grimlock--custom_header-displayed',          $classes, true ) ] );
        unset( $classes[ array_search( 'grimlock--custom_header-title-displayed',    $classes, true ) ] );
        unset( $classes[ array_search( 'grimlock--custom_header-subtitle-displayed', $classes, true ) ] );
      }
      return $classes;
    }
    
    add_filter( 'body_class', 'gwangi_custom_remove_body_classes', 1000, 1 );

    It should do the trick. ?

    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

    Regards,

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    Excellent. thanks for providing this. Solved.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    You’re welcome. ?

    Best regards,

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

The topic ‘Change ‘category’ template to minimal’ 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.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

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

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site