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_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
| function woo_remove_product_tabs( $tabs ) { | |
| unset( $tabs['description'] ); // Remove the description tab | |
| unset( $tabs['reviews'] ); // Remove the reviews tab | |
| unset( $tabs['additional_information'] ); // Remove the additional information tab | |
| return $tabs; |
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 | |
| // This code should be added to the functions.php file of the child theme | |
| // Add custom info to Additional Information product tab | |
| add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
| function woo_rename_tabs( $tabs ) { | |
| global $product; | |
| $tabs['additional_information']['callback'] = 'custom_function_name'; // this is the function name which is included below | |
| return $tabs; | |
| } |
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 me in | |
| add_action( 'woocommerce_before_single_product', 'themeprefix_woocommerce_template_product_description', 20 ); | |
| /** | |
| * Add product description above product | |
| * Output description tab template using 'woocommerce_before_single_product' hook | |
| */ | |
| function themeprefix_woocommerce_template_product_description() { | |
| wc_get_template( 'single-product/tabs/description.php' ); |
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
| .gform_wrapper div.validation_error { | |
| display: none; | |
| } | |
| .gform_wrapper form li.gfield.gfield_error { | |
| margin-top: 0; | |
| margin-bottom: 0 !important; | |
| background-color: transparent; |
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
| .gform_heading, | |
| .gform_body, | |
| .gform_footer { | |
| clear: both; | |
| padding-bottom: 20px; | |
| } | |
| ul.gform_fields { | |
| list-style: none; | |
| margin: 0 -15px; |
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
| jQuery(document).ready(function($) { | |
| $(".header").backstretch([ // Target your HTML element | |
| '/wp-content/uploads/2016/09/image-1.jpg', // Add in your images | |
| '/wp-content/uploads/2016/09/image-2.jpg', | |
| ],{ | |
| duration:3000, // Time between transitions | |
| fade:750, // Transition effect | |
| }); | |
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 opening PHP tag above | |
| // Remove comments from specific categories. Change out categories in array as needed. | |
| add_action( 'wp_enqueue_scripts', 'wsm_remove_comments_in_category' ); | |
| function wsm_remove_comments_in_category() { | |
| if ( in_category( array( 'No Comments', 'Uncategorized', ) ) ) { | |
| remove_action( 'genesis_after_post', 'genesis_get_comments_template' ); | |
| remove_action( 'genesis_after_entry', 'genesis_get_comments_template' ); | |
| remove_action( 'genesis_comment_form', 'genesis_do_comment_form' ); |
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 | |
| /** | |
| * @author Brad Dalton | |
| * @link https://wpsites.net/web-design/add-custom-field-to-genesis-loop/ | |
| */ | |
| add_action( 'genesis_entry_content', 'function_name', 12 ); | |
| function function_name() { | |
| $value = get_post_meta( get_the_ID(), 'key', 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
| function filterable_portfolio_do_loop() { | |
| $args = array( | |
| 'public' => true, | |
| ); | |
| $customPostTaxonomies = get_object_taxonomies('corso'); | |
| if ( $customPostTaxonomies ) { | |
| foreach($customPostTaxonomies as $tax) { |
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 | |
| /** | |
| * Have WordPress match postname to any of our public post types (post, page, race). | |
| * All of our public post types can have /post-name/ as the slug, so they need to be unique across all posts. | |
| * By default, WordPress only accounts for posts and pages where the slug is /post-name/. | |
| * | |
| * @param $query The current query. | |
| */ | |
| function gp_add_cpt_post_names_to_main_query( $query ) { |