-
Author
-
August 6, 2015 at 20:29 #72054ShauntiGParticipant
Ok, since I haven’t received a reply on this issue due to possible Q&A redundancy, I’ll explain in more detail my experience with the annoying WP “Archive for category” text. I wanted to just remove this text only. Not the whole thing. As in if you have a Category named “Apples” the whole thing would read “Archive for category: Apples”, which is not what is needed for a menu item. What is needed is just “Apples”. The code $output = __(‘Archive for category:’,’kleo_framework’).” “.single_cat_title(”,false); in Kleo child theme/functions.php has not worked. I’ve tried removing the “Archive for category:” text and the whole thing is still there. I cleared the cache and it’s still there. The only thing that has worked so far is only a partial fix, which is in Custom CSS .archive .page-title { display: none; } which removes the whole thing, and that’s not quite what I want. What is the Custom CSS to just remove “Archive for category:” and not “Apples”? I’m running the latest version of WP, could that be the issue for the first above mentioned code not to work? Because from my end it’s clearly Apples & Oranges…Parton the pun… Someone please help. https://socialbilitty.com
August 6, 2015 at 20:52 #72060sharmstrModeratorIf you merely want to remove it from the page title: https://archived.seventhqueen.com/forums/topic/hide-archive-for-category-in-the-title#post-64723 Though make sure you get the latest kleo_title function code from /kleo/kleo-framework/lib/function-core.php since I dont know if its been changed since I’ve posted that.
You mentioned menus, but I dont see where that is happening on your site.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
August 9, 2015 at 04:25 #72315ShauntiGParticipantThanks for responding, I don’t want to remove the entire page title, right now the page title is completely removed with .archive .page-title { display: none; } in quick CSS, the URL https://socialbilitty.com/category/news/entertainment/filmmaking/ for example is a menu item on the front page of the site. I want the title to read just “Filmmaking”, it is also an H1 tag for SEO as well. The latest kleo_title function code was last modified on 11-20-14, if I need to update the code where can I get the latest, the Kleo theme Version: 3.0.6. is in the latest, which is installed.
Thanks,
August 9, 2015 at 14:05 #72322sharmstrModeratorI wasnt suggesting using css at all. I understand you dont want to remove the entire title, that’s why gave you that link and not the css. Please read my answer again. I gave you the path to the latest code.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
August 10, 2015 at 16:52 #72439sharmstrModeratorYou need the entire kleo_title function.
COPY CODEfunction 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; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.