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 | |
/*Register Custom Post Type*/ | |
function tp_custom_portfolio(){ | |
$labels=array( | |
'name'=>__('Portfolios'), | |
'singular_name'=>__('Portfolio'), | |
'add_new'=>__('Add New Portfolio'), | |
'edit_items'=>__('Edit Portfolio'), | |
'new_item'=>__('New Portfolio'), | |
'new_item' => __( 'New Portfolio', 'tp_portfolio_tx' ), |
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
function team_taxonomies() { | |
$args = array( | |
'hierarchical' => true, | |
'labels' => array( | |
'name' => 'Team Members Type', | |
'singular_name' => 'Member Type', | |
'search_items' => __( 'Search Member' ), | |
'all_items' => __( 'All Member' ), | |
'parent_item' => __( 'Parent Member' ), |
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
function iconWishlist($value){ | |
return '<i class="fa fa-heart"></i><span>Add to wishlist</span>'; | |
} | |
function iconWishlistAdd(){ | |
return '<i class="fa fa-check"></i><span>View wishlist</span>'; | |
} | |
add_filter( 'yith_wcwl_button_label','iconWishlist'); |
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
=================== Type 1 Popular ============== | |
/*Latest Post Shortcode*/ | |
function cruise_latest_post($atts, $content = null ) { | |
// Attributes | |
extract( shortcode_atts( | |
array( | |
'title' => 'Search For Courses', | |
), $atts ) | |
); |
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
//For Time From Dashboard | |
<?php the_time(get_option( 'date_format' ) )?> |
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
//Shop Page URL | |
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) ); | |
//My Account URL | |
$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); | |
if ( $myaccount_page_id ) { | |
$myaccount_page_url = get_permalink( $myaccount_page_id ); | |
} | |
//Cart URL |
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 | |
/*Product DIscount Calculation*/ | |
//put it on Function | |
function discount_product(){ | |
global $product; | |
$discount = $product->sale_price ; | |
if ($discount) { | |
$percentage = round( ( ( $product->regular_price - $product->sale_price ) / $product->regular_price ) * 100 ); | |
$wc_percent = $price .' <span class="product-discount">'. sprintf( __('%s', 'cruise' ), $percentage . '% OFF</span>' ); | |
} |
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
.price_slider{ | |
margin-bottom: 1em; | |
} | |
.price_slider_amount { | |
text-align: right; | |
line-height: 2.4em; | |
font-size: 0.8751em; | |
} |
OlderNewer