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
  • 09:24 (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 / rss_widget_links_new_window.php
Last active January 1, 2024 17:54
open wordpress rss widget links in a new window
@eri-trabiccolo
eri-trabiccolo / pp_donate_menu_item.php
Created February 10, 2015 17:25
Add paypal donate button in the menu
function get_ppdonate_form( $echo = true ){
ob_start();
// replace value="XXXX" with your button id
?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXX">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
</form>
<?php
@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 / different-menu.php
Created February 20, 2015 15:26
Different menu
add_filter('tc_menu_args', 'my_menus');
function my_menus($args){
$page_menu = array(
//page_id => menu_id
'19' => '14',
'2' => '2'
);
if ( is_page() && array_key_exists(tc__f('__ID'), $page_menu) )
$args['menu'] = $page_menu[tc__f('__ID')];
return $args;
@eri-trabiccolo
eri-trabiccolo / change_footer_widgets_classes.php
Created February 25, 2015 08:57
Change footer widgets classes