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 | |
/* | |
* Hero slider Shortcode | |
* ======================================================= | |
* Register Hero slider shortcode | |
* ======================================================= | |
*/ | |
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 | |
//functions php | |
add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); | |
function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
global $woocommerce; | |
ob_start(); | |
?> | |
<a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php esc_html_e('View your shopping cart', 'text_domain'); ?>"> |
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 | |
//functions php | |
add_action('init', 'themename_custom_icon_set'); | |
function themename_custom_icon_set() { | |
if( function_exists( 'kc_add_icon' ) ) { | |
kc_add_icon( get_template_directory_uri().'/css/material-design-iconic-font.min.css' ); | |
kc_add_icon( get_template_directory_uri().'/css/flaticon.css' ); |
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
<div class="product-tablist"> | |
<ul class="tab-style"> | |
<li class="active" data-view="grid-view"><i class="fa fa-th"></i></li> | |
<li data-view="list-view"><i class="fa fa-th-list"></i></li> | |
</ul> | |
</div> | |
//add archive product | |
<div class="product-bottom-area grid-view clearfix"> |
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 | |
//this code is functions.php | |
function getPostViews($postID){ | |
$count_key = 'post_views_count'; | |
$count = get_post_meta($postID, $count_key, true); | |
if($count==''){ | |
delete_post_meta($postID, $count_key); | |
add_post_meta($postID, $count_key, '0'); |
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
/*woocommerce pagination*/ | |
.woocommerce nav.woocommerce-pagination{} | |
.woocommerce nav.woocommerce-pagination ul.page-numbers{} | |
.woocommerce nav.woocommerce-pagination ul li{} | |
.woocommerce nav.woocommerce-pagination ul li a{} | |
.woocommerce nav.woocommerce-pagination ul li span.current, | |
.woocommerce nav.woocommerce-pagination ul li a:hover{} | |
.woocommerce nav.woocommerce-pagination ul li a.prev, | |
.woocommerce nav.woocommerce-pagination ul li a.next{} |
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 | |
function themename_body_classes( $classes ) { | |
// body calss for page | |
if ( is_singular( 'page' ) ) { | |
global $post; | |
$classes[] = 'page-' . $post->post_name; | |
} | |
return $classes; | |
} | |
add_filter( 'body_class', 'themename_body_classes' ); |
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 | |
function themeName_get_the_id(){ | |
if(is_woocommerce()){ | |
$id = get_option( 'woocommerce_shop_page_id' ); | |
} elseif(is_home() && !is_front_page()){ | |
$id = get_option( 'page_for_posts' ); | |
} else { | |
$id = get_the_id(); | |
} | |
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 | |
// | |
$date_events = get_post_meta(get_the_ID(), '_eduhome_events_date',true); | |
$date_formet = new DATETIME( $date_field ); | |
<div class="running-offer__time" data-countdown="<?php echo $date_formet->format('Y'); ?>/<?php echo $date_formet->format('m'); ?>/<?php echo $date_formet->format('d'); ?>"> | |
</div> |
NewerOlder