Skip to content

Instantly share code, notes, and snippets.

function example_child_theme_enqueue_styles() {
$parent_style = 'example-theme-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'example-child-theme-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get( 'Version' )
);}
/*
Theme Name: Example Child Theme
Theme URI: https://zemez.io/wordpress/
Author: Jetimpex
Author URI: https://jetimpex.com/
Description: Sample theme description.
Template: parent_theme_folder_name_here
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
add_filter( 'cherry_projects_default_terms_args', 'my_rewrite_project_terms_args' );
function my_rewrite_project_terms_args( $args ) {
$args['orderby'] = 'name';
$args['order'] = 'ASC';
return $args;
}
// Hooking up our functions to WordPress filters
add_filter( 'wp_mail_from', 'wpb_sender_email' );
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );
// Function to change sender name
function wpb_sender_name( $original_email_from ) {
return 'Admin Admin';
}
// Function to change email address
function wpb_sender_email( $original_email_address ) {
return 'admin@example.com';
}
if( is_product() || ( isset( $no_grid ) && $no_grid ) ) {
$classes[] = 'swiper-slide';
}
else if ( is_shop() || is_product_category() || is_product_tag() ) {
$sidebar_position = get_theme_mod( 'sidebar_position' );
if ( 'one-left-sidebar' === $sidebar_position || 'one-right-sidebar' === $sidebar_position ) {
$classes[] = 'col-xs-12 col-sm-6 col-md-4 col-lg-4 col-xl-4';
} else{
$classes[] = 'col-xs-12 col-sm-6 col-md-4 col-lg-4 col-xl-3';
if( is_product() || ( isset( $swiper ) && $swiper ) ) {
$classes[] = 'swiper-slide';
} else if ( is_shop() || is_product_category() || is_product_tag() ) {
$sidebar_position = get_theme_mod( 'sidebar_position' );
if ( 'one-left-sidebar' === $sidebar_position || 'one-right-sidebar' === $sidebar_position ) {
$classes[] = 'col-xs-12 col-sm-6 col-md-4 col-lg-4 col-xl-4';
} else {
$classes[] = 'col-xs-12 col-sm-6 col-md-4 col-lg-4 col-xl-3';
}
preloader_figure: function( self ){
$(window).load(function(){
$('#preloader').fadeOut('slow',function(){$(this).remove();});
});
},
.div#preloader {
position: fixed;
left: 0; top: 0;
z-index: 999;
width: 100%;
height: 100%;
overflow: visible;
background: #(your-HEX-color-code) url('http://files.mimoymima.com/images/loading.gif') no-repeat center center;
}