Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Theme Customizer › Pages › Change ‘category’ template to minimal
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by
Themosaurus.
-
AuthorPosts
-
@themosaurus
- 1 Topics
- 1675 Posts
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.
November 6, 2018 at 19:08 #3363@themosaurus- 1 Topics
- 1675 Posts
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:
Regards,
November 12, 2018 at 20:09 #3479@themosaurus- 1 Topics
- 1675 Posts
You’re welcome. ?
Best regards,
November 15, 2018 at 19:04 #3559 -
AuthorPosts
The topic ‘Change ‘category’ template to minimal’ is closed to new replies.