Beispiel #1
0
        global $post;
        $my_query = get_post($post->post_parent);            
        $subtitle =  get_the_title($my_query->ID);
        dttheme_custom_subtitle_section( __('Attachment','dt_themes') ,$subtitle);
    elseif( is_tax() ):
        $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
        $title = $term->name;
        $subtitle="";
        if( get_query_var( 'taxonomy' ) == "product_cat")
            $subtitle =  __('Products Archive',"dt_themes");
        if( get_query_var( 'taxonomy' ) == "dt_gallery_entries")
            $subtitle = __('Galleries Archive','dt_themes');

        dttheme_custom_subtitle_section($title,$subtitle);
    elseif( is_post_type_archive('product') ):
        dttheme_subtitle_section( get_option('woocommerce_shop_page_id'), 'page' );
    elseif( is_category( ) ):
        dttheme_custom_subtitle_section(single_cat_title('',FALSE) ,__('Category Archive','dt_themes'));
    elseif( is_tag( ) ):
        dttheme_custom_subtitle_section(single_tag_title('',FALSE) ,__('Tag Archive','dt_themes'));
    elseif( is_author() ):
        $curauth = get_user_by('slug',get_query_var('author_name')) ;   
        dttheme_custom_subtitle_section($curauth->nickname ,__('Author Archive','dt_themes'));
    elseif( is_year() ): 
        dttheme_custom_subtitle_section(get_the_time('Y'),__('Year Archive','dt_themes'));   
    elseif( is_month() ): 
        dttheme_custom_subtitle_section(get_the_time('F'),__('Month Archive','dt_themes'));   
    elseif( is_search() ):
        dttheme_custom_subtitle_section(__('Search','dt_themes'), __('Search Result for ','dt_themes').get_search_query() );
    elseif( is_404() ):
        dttheme_custom_subtitle_section(__('LOST','dt_themes'),__('Oops Nothing Found','dt_themes'));
Beispiel #2
0
        } elseif ($post_type === "dt_questions") {
            dttheme_subtitle_section($post->ID, 'dt_questions');
        } elseif ($post_type === "dt_assignments") {
            dttheme_subtitle_section($post->ID, 'dt_assignments');
        } elseif ($post_type === "dt_gradings") {
            dttheme_subtitle_section($post->ID, 'dt_gradings');
        } elseif ($post_type === "dt_certificates") {
            dttheme_subtitle_section($post->ID, 'dt_certificates');
        } elseif ($post_type === "course") {
            dttheme_subtitle_section($post->ID, 'course');
        } elseif ($post_type === "lesson") {
            dttheme_subtitle_section($post->ID, 'lesson');
        } elseif ($post_type === "quiz") {
            dttheme_subtitle_section($post->ID, 'quiz');
        } elseif ($post_type === "dt_portfolios") {
            dttheme_subtitle_section($post->ID, 'dt_portfolios');
        } elseif (in_array('events-single', get_body_class())) {
            dttheme_custom_subtitle_section('', "events-bg");
        } elseif (in_array('single-tribe_venue', get_body_class())) {
            dttheme_custom_subtitle_section('', "events-bg");
        } elseif (in_array('single-tribe_organizer', get_body_class())) {
            dttheme_custom_subtitle_section('', "events-bg");
        } elseif ($post_type === "product") {
            $title = get_the_title($post->ID);
            $subtitle = __("Shop", 'dt_themes');
            $icon = "fa-shopping-cart";
            dttheme_custom_subtitle_section($title, " subtitle-for-single-product");
        }
    }
} elseif (is_tax()) {
    $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
Beispiel #3
0
function dttheme_bpress_subtitle()
{
    global $bp;
    if (!empty($bp->displayed_user->fullname)) {
        // looking at a user or self
        $title = bp_current_component() === "profile" ? __("Profile", "dt_themes") : __("Member", "dt_themes");
        $subtitle = strip_tags($bp->displayed_user->userdata->display_name);
        $icon = "fa-user";
        $class = "dark-bg dt-bp-member-page";
        dttheme_custom_subtitle_section($title, $subtitle, $icon, $class);
    } elseif (bp_is_members_component()) {
        dttheme_subtitle_section($bp->pages->members->id, 'page');
    } elseif (bp_is_activity_component()) {
        dttheme_subtitle_section($bp->pages->activity->id, 'page');
    } elseif (bp_current_component() === "groups") {
        dttheme_subtitle_section($bp->pages->groups->id, 'page');
    } elseif (bp_current_component() === "register") {
        dttheme_subtitle_section($bp->pages->register->id, 'page');
    } elseif (bp_current_component() === "activate") {
        dttheme_subtitle_section($bp->pages->activate->id, 'page');
    } else {
        bp_current_component();
    }
}