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 //<= dont add me in | |
add_action( 'customize_register', 'themeprefix_customizer_featured_image' ); | |
function themeprefix_customizer_featured_image() { | |
global $wp_customize; | |
// Add featured image section to the Customizer | |
$wp_customize->add_section( |
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 if ( get_field( 'field_name' ) ): ?> | |
This is displayed when the field_name is TRUE or has a value. | |
<?php else: // field_name returned false ?> | |
This is displayed when the field is FALSE, NULL or the field does not exist. | |
<?php endif; // end of if field_name logic ?> |
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 if(get_field('repeater_field_name')): ?> | |
<div class="flexslider"> | |
<ul class="slides"> | |
<?php while(has_sub_field('repeater_field_name')): ?> | |
<li> | |
<img src="<?php the_sub_field('sub_field'); ?>" /> | |
</li> | |
<?php endwhile; ?> | |
</ul> | |
</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 | |
// 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 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
// Deregister stylesheet Genesis Simple Share | |
add_action( 'wp_enqueue_scripts', 'wpstudio_deregister_styles' ); | |
function wpstudio_deregister_styles() { | |
wp_deregister_style( 'genesis-simple-share-plugin-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
/** | |
* Remove default loop. Execute Custom Loop Instead. | |
*******************************************************/ | |
function shiny_blog_custom_loop() { | |
global $paged; | |
$args = (array( | |
'category_name' => 'Tips Tricks', | |
'order' => 'DESC', | |
'order_by'=> 'date', |
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
// Move Footer widgets and Footer outside Site Container | |
// Reposition the footer widgets | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
add_action( 'genesis_after', 'genesis_footer_widget_areas' ); | |
// Reposition the footer | |
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); |
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 //* Mind this opening php tag | |
/** | |
* EngageWP.com | |
* Remove content excerpt from custom post type archive in Genesis | |
*/ | |
//* Grab the content for each custom post type | |
add_action( 'genesis_before_loop', 'rv_cpt_excerpts' ); | |
function rv_cpt_excerpts() { |
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 | |
/** | |
* Hide shipping rates when free shipping is available. | |
* Updated to support WooCommerce 2.6 Shipping Zones. | |
* | |
* @param array $rates Array of rates found for the package. | |
* @return array | |
*/ | |
function my_hide_shipping_when_free_is_available( $rates ) { | |
$free = array(); |
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 | |
/* | |
* Remove Cross-Sells from the shopping cart page | |
* | |
* Copy and paste this code into functions.php to | |
* remove cross-sells from the cart in WooCommerce. | |
* | |
* You may need to remove the opening <?php tag | |
* before you add it to your functions file. |