Example #1
0
        $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'));
    endif;?> 
Example #2
0
    $title = __("Category Archives", 'dt_themes');
    dttheme_custom_subtitle_section($title, " subtitle-for-archive-categories");
} elseif (is_tag()) {
    $title = __("Tag Archives", 'dt_themes');
    dttheme_custom_subtitle_section($title, " subtitle-for-archive-tags");
} elseif (is_month()) {
    $title = __("Monthly Archives", 'dt_themes');
    dttheme_custom_subtitle_section($title, " subtitle-for-archive-month");
} elseif (is_year()) {
    $title = __("Yearly Archives", 'dt_themes');
    dttheme_custom_subtitle_section($title, " subtitle-for-archive-year");
} elseif (is_day() || is_time()) {
} elseif (is_author()) {
    $curauth = get_user_by('slug', get_query_var('author_name'));
    $title = __("Author Archives", 'dt_themes');
    dttheme_custom_subtitle_section($title, " subtitle-for-archive-author");
} elseif (in_array('events-archive', get_body_class())) {
    dttheme_custom_subtitle_section('', "events-bg");
} elseif (is_search()) {
    $title = __("Search Result for ", 'dt_themes') . get_search_query();
    dttheme_custom_subtitle_section($title, " subtitle-for-search");
} elseif (is_404()) {
    $title = __("Lost ", 'dt_themes');
    dttheme_custom_subtitle_section($title, " subtitle-for-404");
} elseif (in_array('learner-profile', get_body_class())) {
    $title = __("Learner Profile ", 'dt_themes');
    dttheme_custom_subtitle_section($title, " learner-profile");
} elseif (in_array('course-results', get_body_class())) {
    $title = __("Course Results ", 'dt_themes');
    dttheme_custom_subtitle_section($title, " course-results");
}
Example #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();
    }
}