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 […]
Function: WordPress functions
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 […]
The sticky header is a cool feature we all love :). Though we might find it useful just in desktop browsers and we would like to keep the static header in mobiles. Here’s a simple snippet to add to your child-theme functions.php in order to achieve that. add_filter(‘tc_opt_tc_sticky_header’, ‘disable_sticky_in_mobiles’); function […]
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 […]
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 […]
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 […]
If you want your featured pages titles be a link to the featured pages, this snippet is what you need. You do not need to copy both versions, choose the one you like best! 1) Javascript version Compatible with FPU plugin, FP plugin, Customizr, Customizr-Pro add_action(‘wp_footer’, ‘fp_titles_linkizr’, 200); function […]
There are several ways to override the default comments view of the Customizr WordPress theme. 1) Overriding the comments.php template with a child theme. You can make a copy of the comments.php file of the theme, paste it into your child theme and add custom code there. The Child theme template […]
Updated August 2015: Added an option to automatically loop youtube videos (default true) and code updated to work with Customizr-Pro 1.2+ and Customizr 3.4+ Updated April 2015: Added an option to prevent the related videos showing (youtube). Updated March 2015: Added unmute on hover. This snippet works also with Customizr-Pro […]
In this simple example, I ‘ll show you how to widgetized the home page of the Customizr theme by placing a widget area above the featured pages. In the following snippet, the widget area is added before the featured pages of the home page with the action hook named ‘__before_fp’. […]
WordPress offers built-in functions to display the previous and next post link. next_post_link( $format, $link, $in_same_term = false, $excluded_terms = ”, $taxonomy = ‘category’ ); previous_post_link( $format, $link, $in_same_term = false, $excluded_terms = ”, $taxonomy = ‘category’ ); As you can see there’s a boolean parameter named ‘in_same_term’. This […]
Let’s say you have created a slider named “my-slider” and you want to display it in your 404 page or in your search pages. Since there’s no option to style those pages from the WP admin, you’ll have to code something. Here’s a short snippet to do it. add_filter(‘tc_show_slider’ , […]