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 tcp_menu_shortcode($atts) { | |
extract(shortcode_atts(array( 'id' => null), $atts)); | |
return presscore_nav_menu( array( 'menu' => $id, 'echo' => false, 'menu_id' => 'top-menu', 'container' => 'div', 'container_class' => 'mini-nav', 'submenu_class' => 'mini-sub-nav') ); | |
} | |
add_shortcode('tcpmenu', 'tcp_menu_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
if ( ! function_exists( 'dt_woocommerce_template_loop_product_title' ) ) : | |
/** | |
* Show the product title in the product loop. | |
*/ | |
function dt_woocommerce_template_loop_product_title() { | |
if ( presscore_config()->get( 'show_titles' ) && get_the_title() ) : ?> | |
<h2 class="entry-title"> | |
<a href="<?php the_permalink(); ?>" title="<?php echo the_title_attribute( 'echo=0' ); ?>" rel="bookmark"><?php | |
the_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
function custom_excerpt_length( $excerpt ) { | |
if(!is_page( 2 ) && !is_page( 25 )) { | |
$length = 10; //adjust the number of words | |
$excerpt = wp_trim_words( $excerpt, $length ); | |
} | |
return $excerpt; | |
} | |
add_filter( 'the_excerpt', 'custom_excerpt_length', 999 ); |
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_portoflio_category_list() { | |
$terms = get_terms( array( | |
'taxonomy' => 'dt_portfolio_category', | |
'hide_empty' => true, | |
) ); | |
$count = count( $terms ); | |
if ( $count > 0 ) { | |
$cats = '<ul>'; | |
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 | |
// File Security Check. | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
$config = presscore_config(); | |
$css = The7_Fancy_Title_CSS::get_css_for_post( $config->get( 'post_id' ) ); | |
if ( $css ) { | |
echo '<style id="the7-fancy-title-css" type="text/css">' . "\n$css\n" . '</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
add_action( 'after_setup_theme', 'the7child_setup', 100 ); | |
function the7child_setup() { | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 ); | |
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 5 ); | |
} |
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( 'init', function() { | |
class My_Shortcode_Override extends DT_Shortcode_GalleryMasonry { | |
protected function get_albums_attachments( $args = array() ) { | |
$post_type = $this->get_att( 'post_type' ); | |
$defaults = array( | |
'orderby' => 'date', | |
'order' => 'DESC', | |
'number' => false, | |
'category' => array(), |
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 | |
/** | |
* Album single page template. | |
* | |
* @package The7 | |
* @since 1.0.0 | |
*/ | |
// File Security Check | |
if ( ! defined( 'ABSPATH' ) ) { exit; } |
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
<script type="text/javascript" > | |
jQuery(document).ready(function($) { | |
$('.dt-my-button a').on("click", function(){ | |
alert("dt-my-button menu was clicked."); | |
}); | |
}); | |
</script> |
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_filter( 'presscore_nav_menu_args', 'bottom_menu_filter' ); | |
function bottom_menu_filter( $args = array() ) { | |
$location = $args['theme_location']; | |
if( $location == 'bottom' ) { | |
if(is_page( 2 )) { //if page id 2 | |
$page_menu = intval( 199 ); //display menu with id 199 | |