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
| # Ignore everything # | |
| ** | |
| !wp-content/ | |
| wp-content/** | |
| !wp-content/themes/ | |
| !wp-content/plugins/ | |
| wp-content/themes/** | |
| wp-content/plugins/** | |
| # Add two rules for each Theme or Plugin you want to include: |
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 .site-inner | |
| add_filter( 'genesis_markup_site-inner', '__return_null' ); | |
| add_filter( 'genesis_markup_content-sidebar-wrap_output', '__return_false' ); | |
| add_filter( 'genesis_markup_content', '__return_null' ); | |
| ?> |
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 | |
| /** | |
| * Get field key for field name. | |
| * Will return first matched acf field key for a give field name. | |
| * | |
| * ACF somehow requires a field key, where a sane developer would prefer a human readable field name. | |
| * http://www.advancedcustomfields.com/resources/update_field/#field_key-vs%20field_name | |
| * | |
| * This function will return the field_key of a certain field. |
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 | |
| /** | |
| * Template Name: Create Post | |
| * | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/front-end-posting-with-acf-pro/ | |
| * @uses Advanced Custom Fields Pro | |
| */ | |
| /** |
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
| add_action( 'woocommerce_check_cart_items', 'wc_minimum_order_amount' ); | |
| function wc_minimum_order_amount() { | |
| // Set this variable to specify a minimum order value | |
| $minimum = 50; | |
| if ( WC()->cart->total < $minimum ) { | |
| WC()->add_error( sprintf( 'You must have an order with a minimum of %s to place your order, your current order total is %s.' , | |
| woocommerce_price( $minimum ), |
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 */ | |
| // If using Canvas: Replace WooCanvas Default Pagination with WooCommerce Pagination | |
| add_action('init','alter_woo_hooks'); | |
| function alter_woo_hooks() { | |
| remove_action( 'woocommerce_after_main_content', 'canvas_commerce_pagination', 01, 0 ); | |
| } | |
| add_action( 'woocommerce_pagination', 'woocommerce_pagination', 1 ); |
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 Continue Shopping Button on Cart Page | |
| * Add to theme functions.php file or Code Snippets plugin | |
| */ | |
| add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' ); | |
| function woo_add_continue_shopping_button_to_cart() { |
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
| /** | |
| * Each of these samples can be used - note that you should pick one rather than add them all. | |
| * | |
| * How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
| * Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
| **/ | |
| /** | |
| * Add a content block after all notices, such as the login and coupon notices. | |
| * |
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 include the opening php tag above | |
| add_action( 'genesis_entry_content', 'jmw_add_envira_gallery_after_content', 15 ); | |
| /* | |
| * Add the gallery after the end of the content | |
| */ | |
| function jmw_add_envira_gallery_after_content() { | |
| $gallery = get_post_meta( get_the_ID(), 'gallery' ); // 'gallery' is name of my ACF gallery field |
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
| // Enqueue scripts and styles | |
| add_action( 'wp_enqueue_scripts', 'custom_scripts_styles_mobile_responsive' ); | |
| function custom_scripts_styles_mobile_responsive() { | |
| wp_enqueue_script( 'beautiful-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); | |
| wp_enqueue_style( 'dashicons' ); | |
| } |