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 presscore_get_post_data( $html = '' ) { | |
$href = 'javascript: void(0);'; | |
if ( 'post' == get_post_type() ) { | |
// remove link if in date archive | |
if ( !(is_day() && is_month() && is_year()) ) { | |
$href = presscore_get_post_day_link(); |
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 presscore_blog_title() { | |
$wp_title = wp_title('', false); | |
return $wp_title; | |
} |
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
add_action('admin_head', 'my_custom_css'); | |
function my_custom_css() { | |
echo '<style> | |
.ult_activate { | |
display: none; | |
} | |
</style>'; | |
} |
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 remove_benefits_search() { | |
global $wp_post_types; | |
$wp_post_types['dt_benefits']->exclude_from_search = true; | |
} | |
add_filter('pre_get_posts','remove_benefits_search'); |
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
add_action( 'get_header', 'dt_product_sidebar', 10 ); | |
function dt_product_sidebar() { | |
$config = Presscore_Config::get_instance(); | |
if(is_product() ){ | |
$config->set( 'sidebar_position', 'right' ); | |
$config->set( 'footer_widgetarea_id', 'sidebar_1' ); | |
} |
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 dt_buddypress_template_config() { | |
if( bbp_is_single_user() ){ | |
$pagid = 35215; //sidebar, footer settings of the page id given will be applied to user profiles | |
$config = presscore_get_config( ); | |
presscore_config_base_init( $pagid ); | |
} | |
} | |
add_action( 'get_header', 'dt_buddypress_template_config', 10 ); |
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 custom_enq_childminjs() { | |
wp_dequeue_script( 'dt-main', get_template_directory_uri() . '/js/main.js', array( 'jquery' ), false, true ); | |
wp_register_script('dt-main', get_stylesheet_directory_uri() . '/js/main.js', array('jquery'),false, true); | |
wp_enqueue_script('dt-main'); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_enq_childminjs' ); |
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
//add this code in functions.php | |
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
//and add this rule in Theme options > General > CUstom CSS | |
.project-list-content a.add_to_cart_button:after { | |
display: none; | |
} |
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 presscore_top_bar_contact_element( $element ){ | |
$white_list = array( | |
'address', | |
'phone', | |
'email', | |
'skype', | |
'clock' | |
); | |
if ( in_array($element, $white_list) ) { |
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
.product_type_variable:after { | |
background-image: url("data:image/svg+xml,%3Csvg%20version=%221.1%22%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20x=%220px%22%20y=%220px%22%20width=%2224px%22%20height=%2224px%22%20viewBox=%220%200%2024%2024%22%20enable-background=%22new%200%200%2024%2024%22%20fill=%22white%22%20xml:space=%22preserve%22%3E%3Cpath%20d=%22M2.053,13.145h5.746v3.332H5.892v4.506H3.96v-4.506H2.053V13.145z%20M9.152,11.577h1.907v9.405h1.931v-9.405h1.908V8.245H9.152V11.577z%20M12.989,3.018h-1.931v3.778h1.931V3.018z%20M21.947,13.154h-5.744v3.332h1.906v4.496h1.932v-4.496h1.906V13.154z%20M5.892,3.018H3.96v8.677h1.932V3.018z%20M20.041,3.018h-1.932v8.677h1.932V3.018z%22/%3E%3C/svg%3E"); | |
} |