This file contains hidden or 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_archive_layout', 10 ); | |
| function dt_archive_layout() { | |
| $config = Presscore_Config::get_instance(); | |
| if( is_archive() || is_category() || is_search() ){ | |
| $config->set( 'template.columns.number', '5' ); | |
| $config->set( 'post.preview.width.min', '200' ); | |
| $config->set( 'image_layout', 'resize' ); |
This file contains hidden or 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 hidden or 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_buddypress_template_config', 10 ); | |
| function dt_buddypress_template_config() { | |
| $config = Presscore_Config::get_instance(); | |
| if( bp_current_component() ){ | |
| $config->set( 'sidebar_position', 'disabled' ); | |
| $config->set( 'footer_show', '0' ); |
This file contains hidden or 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 hidden or 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 hidden or 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 add_portfolio_tags_after_post($content){ | |
| if (is_single() && 'dt_portfolio' == get_post_type() ) { | |
| $tags = get_the_term_list( get_the_ID(), 'dt_portfolio_tags', '', '', ''); | |
| $content .= '<div class="entry-tags">'.$tags.'</div>'; | |
| } | |
| return $content; | |
| } |
This file contains hidden or 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 hidden or 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 hidden or 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_bbypress_template_config() { | |
| if( is_bbpress() ) | |
| { | |
| $config->set( 'sidebar_position', 'right' ); | |
| $config->set( 'sidebar_widgetarea_id', 'sidebar_1' ); | |
| } | |
| } | |
| add_action( 'get_header', 'dt_bbypress_template_config', 10 ); |
This file contains hidden or 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"); | |
| } |