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
<?php | |
// Do not copy opening PHP tag above | |
// Add the Shop page to Genesis breadcrumbs in WooCommerce | |
// NOTE: Assumes Genesis Connect for WooCommerce plugin is active | |
add_filter( 'genesis_archive_crumb', 'wsm_prepend_shop_link', 11, 2 ); | |
add_filter( 'genesis_single_crumb', 'wsm_prepend_shop_link', 11, 2 ); | |
function wsm_prepend_shop_link( $crumb, $args ) { | |
if ( is_singular( 'product' ) || is_tax( 'product_cat' ) || is_tax( 'product_tag' ) ) { |
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
<?php | |
//* Do not copy above. Add the hook where it's going. Change the function name to reflect your situation. | |
add_action( 'your_hook', 'themeprefix_author_gravatar_outside_loop_single_post' ); | |
//* Author Gravatar/Avatar outside of Loop on Single posts | |
function themeprefix_author_gravatar_outside_loop_single_post() { | |
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
<?php | |
/** | |
* Template Name: Testimonial Archives | |
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive | |
*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop |
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
(function($) { | |
/* | |
* new_map | |
* | |
* This function will render a Google Map onto the selected jQuery element | |
* | |
* @type function | |
* @date 8/11/2013 | |
* @since 4.3.0 |
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
<?php | |
/** | |
* Theme Setup | |
* @since 1.0.0 | |
* | |
* This setup function attaches all of the site-wide functions | |
* to the correct hooks and filters. All the functions themselves | |
* are defined below this setup function. | |
* |
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
/** | |
* HEX Color sanitization callback. | |
* | |
* - Sanitization: hex_color | |
* - Control: text, WP_Customize_Color_Control | |
* | |
* Note: sanitize_hex_color_no_hash() can also be used here, depending on whether | |
* or not the hash prefix should be stored/retrieved with the hex color value. | |
* | |
* @see sanitize_hex_color() https://developer.wordpress.org/reference/functions/sanitize_hex_color/ |
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_customize->add_setting( 'themeslug_url_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_url', | |
) ); | |
$wp_customize->add_control( 'themeslug_url_setting_id', array( | |
'type' => 'url', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom URL' ), | |
'description' => __( 'This is a custom url input.' ), |
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
<?php | |
// Change the footer text in Genesis with a back up if blank | |
add_filter('genesis_footer_creds_text', 'genesischild_footer_text'); | |
function genesischild_footer_text() { | |
if( get_theme_mod( 'footer_text_block') != "" ) { | |
echo get_theme_mod( 'footer_text_block'); | |
} | |
else{ |
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
<?php | |
/** | |
* Search Shortcode Excerpt | |
* @since 1.1 Genesis 404 Page plugin | |
* @author Bill Erickson | |
*/ | |
function search_shortcode() { | |
return '<div class="genesis-404-search">' . get_search_form( false ) . '</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
<?php | |
/** | |
* | |
* @package LCW\Templates | |
* @author Pamela Hirsch | |
* @license GPL-2.0+ | |
* @link http://www.pamelahirsch.com/services | |
*/ | |
add_action( 'genesis_meta', 'phc_genesis_meta' ); |