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 | |
//Don't copy above. | |
add_action('widgets_init', 'cabeymer_unregister_widgets', 10); | |
/** | |
* Unregister Various Widgets | |
* Clean up your widgets.php page | |
* Single comment out the ones you want to keep | |
*/ |
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 | |
//* 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 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 | |
//DO NOT COPY THE ABOVE PHP tag -- change yourprefix_ in two locations | |
add_filter( 'pre_get_avatar_data', 'yourprefix_remove_gravatars_from_pinterest_choices', 10, 2 ); | |
/** | |
* Add html5 atts on all avatars to remove from Pinterst choices | |
*/ | |
function yourprefix_remove_gravatars_from_pinterest_choices( $args, $id_or_email ) { | |
$args['extra_attr'] = 'data-pin-no-hover="true" data-pin-nopin="true"'; |
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 | |
// DO NOT COPY THIS opening tag into your file. Use a code editor and ftp. | |
add_action( 'genesis_entry_content', 'yourprefix_display_featured_image', 5 ); | |
/** | |
* Show Featured Image Posts | |
* @since 1.0.0 | |
*/ | |
function yourprefix_display_featured_image() { |
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 | |
/** | |
* Theme Name | |
* | |
* Adds the required WooCommerce setup functions to the Theme Name | |
* | |
* @package Your Package | |
* @author Your Name | |
* @license GPLv3 or later | |
* @license uri https://www.gnu.org/licenses/gpl-3.0.en.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 | |
// prints e.g. 'Current PHP version: 4.1.1' | |
echo 'Current PHP version: ' . phpversion(); | |
// prints e.g. '2.0' or nothing if the extension isn't enabled | |
echo phpversion('tidy'); |
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 | |
//don't add again | |
add_action( 'genesis_before', 'your_prefix_embed_shortcode_archive_intro_text_support' ); | |
/** | |
* Add oEmbed and Shortcode support Genesis archive description | |
*/ | |
function your_prefix_embed_shortcode_archive_intro_text_support() { |
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 | |
// don't add again // assumes this is in an include in your child theme usually a helper-functions.php file | |
/** | |
* Check if WooCommerce Page of all kinds | |
* @thanks: https://faish.al/2014/01/06/check-if-it-is-woocommerce-page/ | |
*/ | |
function theme_prefix_is_woocommerce_page() { | |
if( function_exists ( 'is_woocommerce' ) && is_woocommerce() ) : | |
return true; |
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 | |
// don't add again | |
add_action( 'genesis_entry_content', 'your_prefix_featured_image', 5 ); | |
/** | |
* Show Featured Image on post and pages and a CPT if you got one (add to the array) | |
*/ | |
function your_prefix_featured_image() { | |
if ( ! has_post_thumbnail() || ! is_singular() ) return; |