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 header on individual pages

This topic is resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • sayf
    Participant
    • 3 Topics
    • 9 Posts
    @sayf00

    Hi,

    Similar to this question https://support.themosaurus.com/forums/topic/remove-header-colour-layout/

    However I would like to remove the header colour only on specific pages.

    How would I do this?

    Thanks
    Sayf

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

    Hi @sayf00,

    For which pages do you wish to remove the header?

    Thank you.

    sayf
    Participant
    • 3 Topics
    • 9 Posts
    @sayf00
    This reply has been marked as private.
    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @sayf00,

    To remove the header from your job listing pages, simply add the following code snippet to your website:

    /**
     * Hide the Custom Header for all job 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_singular( 'job_listing' ) ) {
    	$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 job 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_singular( 'job_listing' ) ) {
        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 );

    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

    It should do the trick. ?

    Regards,

    sayf
    Participant
    • 3 Topics
    • 9 Posts
    @sayf00

    Thanks. That worked perfectly.

    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 ‘Remove header on individual pages’ 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