This topic has 2 replies, 3 voices, and was last updated 9 years by sharmstr.

  • Author
  • #89977
     krazykaze
    Participant

    hi, i want to remove “archive” from categories page title, dont know why i cant.

     

    oh and one more thing so i dont have to create another topic, how do i change the “read more” to “share/comment” on blog posts? thanks

    #89978
     timmolenaar
    Participant

    Add this to your child themes functions.php

    function kleo_title()
    {
    $output = “”;
    if (is_tag()) {
    $output = single_tag_title(”,false);
    }
    elseif(is_tax()) {
    $term = get_term_by(‘slug’, get_query_var(‘term’), get_query_var(‘taxonomy’));
    $output = $term->name;
    }
    elseif ( is_category() ) {
    $output = single_cat_title(”, false);
    }
    elseif (is_day())
    {
    $output = __(‘Archive for date:’,’kleo_framework’).” “.get_the_time(‘F jS, Y’);
    }
    elseif (is_month())
    {
    $output = __(‘Archive for month:’,’kleo_framework’).” “.get_the_time(‘F, Y’);
    }
    elseif (is_year())
    {
    $output = __(‘Archive for year:’,’kleo_framework’).” “.get_the_time(‘Y’);
    }
    elseif (is_author()) {
    $curauth = (get_query_var(‘author_name’)) ? get_user_by(‘slug’, get_query_var(‘author_name’)) : get_userdata(get_query_var(‘author’));
    $output = __(‘Author Archive’,’kleo_framework’).” “;

    if( isset( $curauth->nickname ) ) {
    $output .= __(‘for:’,’kleo_framework’).” “.$curauth->nickname;
    }
    }
    elseif ( is_archive() ) {
    $output = post_type_archive_title( ”, false );
    }
    elseif (is_search())
    {
    global $wp_query;
    if(!empty($wp_query->found_posts))
    {
    if($wp_query->found_posts > 1)
    {
    $output = $wp_query->found_posts .” “. __(‘search results for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
    }
    else
    {
    $output = $wp_query->found_posts .” “. __(‘search result for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
    }
    }
    else
    {
    if(!empty($_GET[‘s’]))
    {
    $output = __(‘Search results for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
    }
    else
    {
    $output = __(‘To search the site please enter a valid term’,’kleo_framework’);
    }
    }

    }
    elseif ( is_front_page() && !is_home() ) {
    $output = get_the_title(get_option(‘page_on_front’));

    } elseif ( is_home() ) {
    if (get_option(‘page_for_posts’)) {
    $output = get_the_title(get_option(‘page_for_posts’));
    } else {
    $output = __( ‘Blog’, ‘kleo_framework’ );
    }

    } elseif ( is_404() ) {
    $output = __(‘Error 404 – Page not found’,’kleo_framework’);
    }
    else {
    $output = get_the_title();
    }

    if (isset($_GET[‘paged’]) && !empty($_GET[‘paged’]))
    {
    $output .= ” (“.__(‘Page’,’kleo_framework’).” “.$_GET[‘paged’].”)”;
    }

    return $output;
    }

    #90284
     sharmstr
    Moderator

    You can translate the read more into anything you want it to say. https://archived.seventhqueen.com/documentation/kleo#translation

    Do you still need help with removing ‘archive’ or did the solution provided work for you?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?