Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Theme Customizer › Appearance › Remove header on individual pages
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by
Themosaurus.
-
AuthorPosts
-
sayfParticipant@sayf00
- 3 Topics
- 9 Posts
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
SayfNovember 10, 2018 at 04:11 #3443@themosaurus- 1 Topics
- 1675 Posts
November 12, 2018 at 18:38 #3470@themosaurus- 1 Topics
- 1675 Posts
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:
It should do the trick. ?
Regards,
November 16, 2018 at 11:05 #3566@themosaurus- 1 Topics
- 1675 Posts
You’re welcome. ?
Best regards,
November 16, 2018 at 16:55 #3585 -
AuthorPosts
The topic ‘Remove header on individual pages’ is closed to new replies.