Removing 'Archives' from category title
-
Hi,
I’ve searched all I can but can’t see a specific answer…
Is there a way of removing ‘archives’ from the title on category pages?
For example, it reads ‘NEWS Archives — Seat Pitch’ at the top of this page: https://seatpitch.co.uk/news/
I’d like it just to say ‘NEWS — Seat Pitch’.
I’ve changed the single_cat_title in the Twenty Eleven and Twenty Ten parent themes.
Not quite sure what to do in my theme that won’t affect the coding, I suspect it’s the custom functions file — extracts here (I could be wrong though?)…
#if the title is being displayed on index pages (categories/archives/search results) if (is_category() || is_archive() || is_search()) { if ($options['seo_index_type'] == 'index_type_1') echo get_bloginfo('name').$options['seo_index_separate'].wp_title('',false,''); if ($options['seo_index_type'] == 'index_type_2') echo wp_title('',false,'').$options['seo_index_separate'].get_bloginfo('name'); if ($options['seo_index_type'] == 'index_type_3') echo wp_title('',false,''); } } /*this function controls the meta description display*/ function description() { global $options; #homepage descriptions if (is_home() && $options['seo_home_description'] == 'On') echo '<meta name="description" content="'.$options['seo_home_descriptiontext'].'" />'; #single page descriptions global $wp_query; if (isset($wp_query->post->ID)) $postid = $wp_query->post->ID; $key2 = 'izi_seo_single_field_description'; if (isset($postid)) $exists = get_post_meta($postid, $key2, true); if ($options['seo_single_description'] == 'On' && $exists !== '') { if (is_single() || is_page()) echo '<meta name="description" content="'.$exists.'" />'; } #index descriptions remove_filter('term_description','wpautop'); $cat = get_query_var('cat'); $exists2 = category_description($cat); if ($exists2 !== '' && $options['seo_index_description'] == 'On') { if (is_category()) echo '<meta name="description" content="'. $exists2 .'" />'; } if (is_archive() && $options['seo_index_description'] == 'On') echo '<meta name="description" content="Currently viewing archives from'. wp_title('',false,'') .'" />'; if (is_search() && $options['seo_index_description'] == 'On') echo '<meta name="description" content="'. wp_title('',false,'') .'" />'; } /*this function controls canonical urls*/ function canonical() { global $options; #homepage urls if (is_home() && $options['seo_home_canonical'] == 'On') echo '<link rel="canonical" href="'.get_bloginfo('url').'" />'; #single page urls global $wp_query; if (isset($wp_query->post->ID)) $postid = $wp_query->post->ID; if ($options['seo_single_canonical'] == 'On') { if (is_single() || is_page()) echo '<link rel="canonical" href="'.get_permalink().'" />'; } #index page urls if ($options['seo_index_canonical'] == 'On') { if (is_archive() || is_category() || is_search()) echo '<link rel="canonical" href="'.get_permalink().'" />'; } }
Thanks in advance!
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]
- The topic ‘Removing 'Archives' from category title’ is closed to new replies.