With the following snippet, you can take control of the various slider texts length in the Customizr theme : title (default 80 chars), lead text under the title (default 250 chars), button text (default 80 chars). add_filter( ‘czr_slide_title_length’, ‘my_slider_text_limits’ ); add_filter( ‘czr_slide_text_length’, ‘my_slider_text_limits’ ); add_filter( ‘czr_slide_button_length’, ‘my_slider_text_limits’ ); function my_slider_text_limits() […]
Function: php functions
Here’s a quick snippet to change the title attribute of the social links that’s displayed when the mouse moves over the link’s icon. By default, it can take two forms : – for rss : Subscribe to my rss feed – for the social networks : Follow me on [the social network] Let’s […]
Learn how to add a widget for qTranslate and style your flags.
This snippet replaces the default published date by the last post update’s date in your post metas. add_filter( ‘tc_date_meta’ , ‘display_the_update_date’); function display_the_update_date() { return sprintf( ‘<a href=”%1$s” title=”updated %2$s” rel=”bookmark”><time class=”entry-date” datetime=”%3$s”>%4$s</time></a>’ , esc_url( get_day_link( get_the_time( ‘Y’ ), get_the_time( ‘m’ ), get_the_time( ‘d’ ) ) ), esc_attr( get_the_modified_date(‘F j, […]
This simple snippet adds an update status after your post title in WordPress. It checks if the post has been updated since its creation and if this update is less than n days old. If the condition is verified, it adds an update status text after the title. In this example, […]
Notice: Since Customizr v3.4.6 and Customizr-Pro 1.2.0 a new set of options has been introduced in the slides editing screen. You will be able to set a custom link url for your image (and button), open it in a new page and link the whole slide. This snippet will be […]
Notice: Since Customizr v3.4.6 and Customizr-Pro 1.2.0 a new set of options has been introduced in the slides editing screen. You will be able to set a custom link url for your image (and button), open it in a new page and link the whole slide. The caption, though, will […]
This snippet shows you how to add a widget area after the header. You can then use it for a search bar, or a language switcher.
The following is a simple snippet which describes how to replace the sliders default navigation arrows with icons. The method detailed below will also make it possible to use an image or whatever you want as navigation for your slider. Where to copy/paste the code above code? I strongly recommend […]
Here’s a quick snippet to display both your logo and your site title in the header. add_action( ‘__after_logo’ , ‘display_my_site_title’); function display_my_site_title() { //first checks if there is a logo uploaded $logo_src = esc_url ( tc__f( ‘__get_option’ , ‘tc_logo_upload’) ) ; if ( empty($logo_src) ) return; //then print the […]
Use this function in your child theme’s functions.php to change the default link on your logo to another, custom link. Just replace http://new_link with the address you want your logo to point to: add_filter(‘tc_logo_link_url’, ‘change_site_main_link’); function change_site_main_link($output) { return ‘http://new_link’; }
Howdy developer! The following is a quick and easy way to add a link in your tagline in the Customizr theme. We are going to use the ‘tc_tagline_display’ filter to do so. (check how to locate a filter in Customizr) Copy and paste the following code in the functions.php file of […]