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 | |
/** | |
* Author: Hastimal Shah | |
* Link: http://hastishah.com/ | |
* Email: hasti@hastishah.com | |
*/ | |
/* If you dont want to use any force layout then please comment line no 10 to 20 */ | |
//* Force content-sidebar layout setting | |
//add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); // Remove // to uncomment the code |
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 | |
// Adding Divi Builder on Custom Post Type | |
add_filter( 'et_builder_post_types', 'hs_et_builder_post_types' ); | |
// Use ANY ONE OF THE FUNCTION BELOW | |
function hs_et_builder_post_types( $post_types ) { | |
$post_types[] = 'news'; | |
// $post_types[] = 'ANOTHER_CPT_HERE'; | |
return $post_types; | |
} |
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
/** | |
* This code snippet removes JavaScript and CSS files loaded from WooCommerce if they are not necessary. | |
* | |
* Please test this on a staging copy of your website before putting this into the functions.php of your live website. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'my_remove_woo_assets', 99 ); | |
function my_remove_woo_assets() { | |
if ( function_exists( 'is_woocommerce' ) ) { // Check if Woo is installed. | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { // Only run on non-Woo pages. | |
// Remove unnecessary stylesheets. |