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 | |
// Adds a [social-icons] shortcode to output Genesis Simple Share icons in posts | |
// https://wordpress.org/plugins/genesis-simple-share/ | |
// Add the code below to your active theme's functions.php file, | |
// or use in a site-specific plugin. | |
// The shortcode takes no attributes; change your icon settings via Genesis → Simple Share. | |
add_shortcode( 'social-icons', 'gss_shortcode' ); |
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 | |
// Force the Page Builder plugin to include 'simple-social-icons' in its widget wrapper class | |
add_filter( 'siteorigin_panels_widget_classes', 'ssi_add_widget_class' ); | |
function ssi_add_widget_class( $classes ) { | |
if ( in_array( 'widget_simple-social-icons', $classes ) ) { | |
$classes[] = 'simple-social-icons'; | |
} | |
return $classes; | |
} |
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 | |
global $wp_current_filter; | |
// Don't process this shortcode in wp_head. This typically happens if a plugin author | |
// uses apply_filters( 'the_content', $content ) for the meta description tag output, | |
// instead of using strip_shortcodes() like a sane person. Processing shortcodes in | |
// the head might be undesirable if your shortcode counts the number of times it's | |
// been used for the purpose of outputting unique class names or IDs, for example. | |
if ( in_array('wp_head', $wp_current_filter) ) { |
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 // Copy everything except for this first line | |
// Favicons generated by realfavicongenerator.net | |
// These should be added in wp-content/themes/child-theme/images/favicons/ | |
remove_action('wp_head', 'genesis_load_favicon'); | |
add_action('wp_head', 'custom_favicon'); | |
function custom_favicon(){ | |
?> |
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
@font-face { | |
font-family: 'ssi-fontello'; | |
src: url('../font/fontello.eot?78492063'); | |
src: url('../font/fontello.eot?78492063#iefix') format('embedded-opentype'), | |
url('../font/fontello.woff?78492063') format('woff'), | |
url('../font/fontello.ttf?78492063') format('truetype'), | |
url('../font/fontello.svg?78492063#fontello') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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 | |
/** | |
* Change the post order for listings | |
* | |
* @author Carrie Dils | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @reference http://codex.wordpress.org/Class_Reference/WP_Query | |
* | |
*/ |
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 to functions.php and leave the “Content” box unticked in Settings > Mandrill | |
// Be sure to omit the opening <?php tag when copying this code | |
// Add paragraph breaks to plain text notifications sent by Mandrill | |
add_filter('mandrill_payload', 'wpmandrill_auto_add_breaks'); | |
function wpmandrill_auto_add_breaks($message) { | |
$html = $message['html']; |
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 hAtom data to all posts and pages | |
function sp_hatom_data($content) { | |
$t = get_the_modified_time('F jS, Y'); | |
$author = get_the_author(); | |
$title = get_the_title(); | |
$content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; | |
return $content; | |
} | |
add_filter('the_content', 'sp_hatom_data'); |
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 everything except for this opening line to your functions file | |
add_filter( 'wp_nav_menu_items', 'sp_add_loginout_link', 10, 2 ); | |
function sp_add_loginout_link( $items, $args ) { | |
// Change 'primary' to 'secondary' to put the login link in your secondary nav bar. | |
if ( $args->theme_location != 'primary' ) { | |
return $items; | |
} | |
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 // Remove the opening PHP tag before pasting to functions.php | |
add_filter( 'agentpress_property_details', 'custom_agentpress_property_details_filter' ); | |
// Filter the property details array for property listings | |
// Replace labels such as "ZIP" with "Postcode" etc. | |
function custom_agentpress_property_details_filter( $details ) { | |
$details['col1'] = array( | |
__( 'Price:', 'apl' ) => '_listing_price', |