This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add Category Type To Body Class Of Single Article */ | |
add_filter('body_class','add_category_to_single'); | |
function add_category_to_single($classes, $class) { | |
if (is_single() ) { | |
global $post; | |
foreach((get_the_category($post->ID)) as $category) { | |
// add category slug to the $classes array | |
$classes[] = $category->category_nicename; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function( $ ){ | |
if($('.class-name').length !== 0) | |
{ | |
$('body').addClass('class-name-added-to-body'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).scroll(function() { | |
$(".fade-on-scroll").css({ | |
'opacity' : 1-(($(this).scrollTop())/250) | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Page Section with field for unique class. | |
function contentSection( $atts, $content = null ) { | |
$content = preg_replace('#^<\/p>|<p>$#', '', $content); | |
$a = shortcode_atts( array( | |
'class' => 'Add Classes Here', | |
), $atts ); | |
return '<div class="full-block '."{$a['class']}".' "><div class="wrap">' . do_shortcode($content) . '</div></div>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* General Class Shortcode | |
function clearline_func() { | |
return '<section class="clear-line"></section>'; | |
} | |
add_shortcode( 'clear-line', 'clearline_func' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Install Font Awesome 4 Menus plugin*/ | |
/*Create Menu - this is for a social icon menu*/ | |
/*Add classes to menu class (i.e. fa fa-facebook)*/ | |
/* FontAwesome Menu */ | |
.menu-social-menu-container { | |
width: 100%; | |
} | |
.menu-social-menu-container ul { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Enqueue scripts and styles | |
add_action( 'wp_enqueue_scripts', 'themename_enqueue_scripts_styles' ); | |
function themename_enqueue_scripts_styles() { | |
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#" onclick="LC_API.show_full_view();return false;"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:before { | |
content:"\f128"; | |
font-size:120px; | |
font-family: FontAwesome; | |
color:#060; | |
float:left; | |
padding-right:10px; | |
line-height: 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' ); |