Snippets

180 posts

How to apply the Lightbox effect to the single post featured image in the Customizr(-Pro) theme

As you surely know you can display the featured image in single post contexts, with the option located at Appearance -> Customize -> Content: home, posts, … -> Single posts Once enabled Customizr(-Pro) will show either the featured image (also called ‘post thumbnail’) or the first post attachment, if the […]

How to display the Category/Tag description in a different place in the Customizr(-Pro) theme

By default Customizr(-Pro) displays the Category/Tag description after the title. You might want to display it in a different place. With the following snippet we’ll see how to display it below the posts navigation. $term_description_filters = array( ‘cat’, ‘tag’, ‘tax’ ); //do not automatically show term descriptions below the title […]

How to display the Customizr(-Pro) vertical menu only in mobiles

Here’s a simple snippet in order to display the vertical menu only in mobiles, keeping the regular one in desktop devices: add_filter(‘tc_opt_tc_menu_style’, ‘tc_vertical_menu_in_mobiles’); function tc_vertical_menu_in_mobiles( $type ) { return wp_is_mobile() ? ‘aside’ : $type; } Where to copy/paste this code? Add it to your child-theme functions.php. Everything you need to […]

How to change the “Leave a comment” text in WordPress ?

This text can be altered with a WordPress filter hook comment_form_defaults In the following code, simply replace Custom leave a comment by your own text :   add_filter(‘comment_form_defaults’, ‘set_my_comment_title’, 20); function set_my_comment_title( $defaults ){ $defaults[‘title_reply’] = __(‘Custom leave a comment’, ‘customizr-child’); return $defaults; }

Change the word HOME in the breadcrumb trail

Updated February 24, 2016: Added the option to output either some text or a Font Awesome icon. In case you want to change the default word “Home” in the breadcrumb trail, to something different, this snippet will allow to change it. To use standard characters: just paste this function into […]

Make the Customizr home slider season based

Compatible with Customizr-Pro Hi, wouldn’t be cool displaying a different slider on the front page, depending on the season? That’s what you have to do: Create 4 sliders and name with the season’s names (lowercase) In Appearance -> Customize -> Content: home, posts, .. -> Front Page -> Slider Options […]

Make a Customizr slider display recent posts

Updated Sep 2015: This snippet now works only with Customizr 3.4.* and Customizr-Pro 1.2.* Updated June 2015: This snippet now works only with Customizr > 3.3.26 and Customizr-Pro > 1.1.9 Updated June 2015: Fixed conflict with AddThis plugin : better handling of the post excerpt. Thanks to @Claudia Lopez for […]