Skip to content

Instantly share code, notes, and snippets.

View eri-trabiccolo's full-sized avatar
❤️
@thomasplevy is my buddy

Rocco Aliberti eri-trabiccolo

❤️
@thomasplevy is my buddy
  • Pinerolo (TO), Italy
  • 05:37 (UTC +02:00)
View GitHub Profile
@eri-trabiccolo
eri-trabiccolo / widget_area_before_customizr_colophon.php
Created January 27, 2015 17:37
Add a full width widget area before customizr colophon
/*add widget area between footer widgets and colophon */
add_filter( 'tc_default_widgets' , 'add_footer_colophon_widget' );
function add_footer_colophon_widget( $defaults ) {
$defaults['fc_widgets'] = array(
'name' => __( 'Footer Colophon Widget' , 'customizr' ),
'description' => __( 'Widget Area Before Colophon' , 'customizr' )
);
return $defaults;
}
@eri-trabiccolo
eri-trabiccolo / home-content-dividers.css
Created January 29, 2015 13:20
home content dividers
/* remove sidebar borders on home*/
.home #left.widget-area,
.home #right.widget-area{
border: none;
}
.home #left.widget-area:after,
.home #right.widget-area:before{
border: none;
}
/* add #content borders on home */
@eri-trabiccolo
eri-trabiccolo / container-header.php
Last active August 29, 2015 14:15
container header
add_action('__header', 'tc_header_container_start', 0);
function tc_header_container_start(){
echo '<div class="tc-header-container container">';
}
add_action('__header', 'tc_header_container_end', 100);
function tc_header_container_end(){
echo '</div>';
}
@eri-trabiccolo
eri-trabiccolo / linkedin_social_title_link.php
Last active August 29, 2015 14:15
change linkedin social title link
@eri-trabiccolo
eri-trabiccolo / menu-outside.php
Last active August 29, 2015 14:15
menu-outside
/* Updated, will work only with Customizr 3.4+ and Customizr-Pro 1.2+*/
$navbar_wrapper_class = '';
add_action('wp', 'menu_outside_header');
function menu_outside_header(){
if ( ! class_exists('TC_menu') )
return;
add_action('__header', 'my_header_container_start', 1);
function my_header_container_start(){
echo '<div class="my-header-container row-fluid">';
}
@eri-trabiccolo
eri-trabiccolo / socials_no_follow.php
Last active August 29, 2015 14:15
socials nofollow
add_filter('tc_additional_social_attributes', 'add_nofollow');
function add_nofollow(){
return 'rel="nofollow"';
}
@eri-trabiccolo
eri-trabiccolo / change_footer_widgets_classes.php
Created February 25, 2015 08:57
Change footer widgets classes
@eri-trabiccolo
eri-trabiccolo / replace_socials_with_site_title_in_header.php
Last active August 29, 2015 14:16
replace socials with site title in header
add_action('wp_head', 'replace_socials_with_title');
function replace_socials_with_title(){
if ( ! ( class_exists('TC_header_main') &&
method_exists('TC_header_main', 'tc_title_view') &&
method_exists('TC_header_main', 'tc_social_in_header') ) )
return;
remove_action('__navbar', array(TC_header_main::$instance, 'tc_social_in_header'), 10 );
add_action('__navbar', 'site_title', 10);
function site_title(){
add_filter('tc_logo_class','__add_logo_classes', 30);
@eri-trabiccolo
eri-trabiccolo / czr-rtm_comp.php
Created March 6, 2015 08:51
Customizr - RTmedia plugin compatibility
add_filter('rtmedia_main_template_include', 'tc_rtmedia_comp', 20);
function tc_rtmedia_comp() {
global $wp_query;
$wp_query->is_singular = true;
}
/*DO NOT COPY THE FOLLOWING IN YOUR CHILD THEME FUNCTIONS.PHP */
/* The following css must be put in your child-theme style.css or in your custom css box */
/*
body.media {
@eri-trabiccolo
eri-trabiccolo / nav_title_off.php
Created March 6, 2015 15:15
disable navigation title with php
add_filter( 'tc_singular_nav_title', '__return_empty_string' );
add_filter( 'tc_list_nav_nav_title', '__return_empty_string' );