This file contains hidden or 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
<?php | |
add_filter( 'wp_nav_menu_objects', 'afn_custom_menu_class' ); | |
/** | |
* Filters the first and last nav menu objects in your menus | |
* to add custom classes. | |
* | |
* @since 1.0.0 | |
* |
This file contains hidden or 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
<?php | |
/** | |
* Enqueue and Load Font Awesome | |
* | |
* @author WPSpeak.com | |
*/ | |
add_action( 'wp_enqueue_scripts', 'afn_enqueue_awesome' ); | |
function afn_enqueue_awesome() { |
This file contains hidden or 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
<?php | |
//* Add Twitter handle to Jetpack Sharing module | |
add_filter ( 'jetpack_sharing_twitter_via', 'afn_add_twitterhandle_via' ); | |
function afn_add_twitterhandle_via() { | |
return 'WPSpeak'; | |
} |
This file contains hidden or 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
<?php | |
//* Customize [...] in WordPress excerpts | |
add_filter( 'the_excerpt', 'sp_read_more_custom_excerpt' ); | |
function sp_read_more_custom_excerpt( $text ) { | |
if ( strpos( $text, '[…]') ) { | |
$excerpt = str_replace( '[…]', '<p><a class="more-link" href="' . get_permalink() . '">Read More →</a></p><br>', $text ); | |
} else { | |
$excerpt = $text . '<p><a class="more-link" href="' . get_permalink() . '">Read More →</a></p>'; | |
} |
This file contains hidden or 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
<?php | |
add_action( 'pre_get_posts', 'mfsbig_remove_floating_social_bar', 15 ); | |
/** | |
* Remove Floating Social Bar from outputting at the top of the content. | |
* | |
* FSB adds these filters at pre_get_posts, priorty 10, so we'll remove them | |
* just after that. | |
* | |
* @author Gary Jones |
This file contains hidden or 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
<?php | |
/** | |
* Conditionally force layout in Genesis Framework | |
*/ | |
function cc_layout_logic() { | |
/** | |
* Genesis layout helper functions. | |
* __genesis_return_content_sidebar | |
* __genesis_return_sidebar_content |
This file contains hidden or 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
<?php | |
add_action( 'wp_enqueue_scripts', 'prefix_enqueue_awesome' ); | |
/** | |
* Register and load font awesome | |
* CSS files using a CDN. | |
* | |
* @link http://www.bootstrapcdn.com/#tab_fontawesome | |
* @author FAT Media | |
*/ | |
function prefix_enqueue_awesome() { |
This file contains hidden or 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
<?php | |
// Add Genesis search form to secondary menu | |
add_filter( 'wp_nav_menu_items', 'genesis_search_secondary_nav_menu', 10, 2 ); | |
function genesis_search_secondary_nav_menu( $menu, stdClass $args ){ | |
if ( 'secondary' != $args->theme_location ) |
This file contains hidden or 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
/* Same as other file, but with extra notes */ | |
/* Embedded Gists */ | |
.line-pre::before, | |
.line-pre::after, | |
.line::before, | |
.line::after { | |
content: ''; /* Fixes addition of float-clearing space added to before and after global pre and div elements */ | |
} |
NewerOlder