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
  • 20:43 (UTC +02:00)
View GitHub Profile
@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 / 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 / linkedin_social_title_link.php
Last active August 29, 2015 14:15
change linkedin social title link
@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 / 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 / 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 / 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 / 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 / different_logo.php
Last active August 29, 2015 14:13
Different logo in a certain page/post
add_filter('tc_logo_src' ,'my_logo');
function my_logo($logo_src){
if ( ! is_singular() )
return;
$mylogo_src = array(
//page_or_post id => url
'31' => 'http://',
'4' => 'http:// '
);
@eri-trabiccolo
eri-trabiccolo / change_left_sidebar_classes.php
Last active August 29, 2015 14:13
Change left sidebar classes
add_filter('tc_left_sidebar_class', 'my_left_sidebar_class');
function my_left_sidebar_class($classes){
return str_replace('span4', 'span2', $classes);
}