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
| // Remove the product description Title | |
| add_filter( 'woocommerce_product_description_heading', 'remove_product_description_heading' ); | |
| function remove_product_description_heading() { | |
| return ''; | |
| } | |
| // Change the product description title | |
| add_filter('woocommerce_product_description_heading', 'change_product_description_heading'); | |
| function change_product_description_heading() { | |
| return __('NEW TITLE HERE', 'woocommerce'); |
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
| //Disable comments on media pages | |
| function filter_media_comment_status( $open, $post_id ) { | |
| $post = get_post( $post_id ); | |
| if( $post->post_type == 'attachment' ) { | |
| return false; | |
| } | |
| return $open; | |
| } | |
| add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 ); |
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
| //# Removing external scripts in Elementor #// | |
| // For Google Fonts: | |
| add_filter( 'elementor/frontend/print_google_fonts', '__return_false' ); | |
| // For Font Awesome Icons: | |
| // Also works on none Elementor-pages | |
| add_action( 'wp_enqueue_scripts', function() { wp_dequeue_style( 'font-awesome' ); }, 50 ); | |
| // To remove the Font Awesome http request as well: |
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
| //* Remove sidebars and header widget area | |
| unregister_sidebar( 'header-right' ); | |
| unregister_sidebar( 'sidebar' ); | |
| unregister_sidebar( 'sidebar-alt' ); | |
| //* Unregister layout settings | |
| genesis_unregister_layout( 'content-sidebar' ); | |
| genesis_unregister_layout( 'sidebar-content' ); | |
| genesis_unregister_layout( 'content-sidebar-sidebar' ); | |
| genesis_unregister_layout( 'sidebar-content-sidebar' ); |
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 a page header widget area in Genesis. Version 1 | |
| //Code will add a site-wide “Page Header” widget area below the header and inside the wrap. | |
| //* Register Page Header | |
| genesis_register_sidebar( array( | |
| 'id' => 'page-header', | |
| 'name' => __( 'Page Header', 'genesis' ), | |
| 'description' => __( 'This is the Page Header area.', 'Genesis' ), | |
| ) ); | |
| //* Add the Page Header |
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
| //HIDE ADDITIONAL CSS IN CUSTOMIZER// | |
| add_action( 'customize_register', 'prefix_remove_css_section', 15 ); | |
| /** | |
| * Remove the additional CSS section, from the Customizer. | |
| */ | |
| function prefix_remove_css_section( $wp_customize ) { | |
| $wp_customize->remove_section( 'custom_css' ); | |
| } |
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 async, defer, or other attributes to enqueue WordPress scripts | |
| * Add async attributes to enqueued scripts where needed. | |
| * The ability to filter script tags was added in WordPress 4.1 for this purpose. | |
| */ | |
| function my_async_scripts( $tag, $handle, $src ) { | |
| // the handles of the enqueued scripts we want to async | |
| $async_scripts = array( 'some-script', 'another-script' ); | |
| if ( in_array( $handle, $async_scripts ) ) { | |
| return '<script type="text/javascript" src="' . $src . '" async="async"></script>' . "\n"; |
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
| define( 'FORCE_SSL_LOGIN', true ); | |
| define( 'FORCE_SSL_ADMIN', true ); | |
| define( 'EMPTY_TRASH_DAYS', 0 ); | |
| define( 'DISABLE_WP_CRON', true ); | |
| define( 'DISALLOW_FILE_EDIT', true ); | |
| define( 'WP_CACHE', false ); | |
| define( 'WP_POST_REVISIONS', false ); | |
| define( 'AUTOSAVE_INTERVAL', 1800 ); |
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 To Top script | |
| add_action( 'wp_enqueue_scripts', 'to_top_script' ); | |
| function to_top_script() { | |
| wp_enqueue_script( 'to-top', get_stylesheet_directory_uri() . '/js/to-top.js', array( 'jquery' ), '1.0', true ); | |
| } | |
| // Add To Top button | |
| add_action( 'genesis_before', 'genesis_to_top'); | |
| function genesis_to_top() { | |
| echo '<a href="#0" class="to-top" title="Back To Top">↑</a>'; | |
| } |
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 me | |
| //Removes Title and Description on CPT Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); | |
| //Removes Title and Description on Blog Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' ); | |
| //Removes Title and Description on Date Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' ); | |
| //Removes Title and Description on Archive, Taxonomy, Category, Tag | |
| remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |