Is it possible to remove the 'Archive of' on all the category pages globally, so that just the title of the category shows?
'archive of' on category pages
8 posts from 3 voices-
Posted 2 years ago #
-
Hey,
Sure, open up archive.php; at the top of the file you can remove the "Archive for" text in this code:
<h2><?php /* If this is a category archive */ if (is_category()) { ?> <?php _e('Archive for','cleancut'); ?> "<?php echo single_cat_title(); ?>" <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <?php _e('Archive for','cleancut'); ?> "<?php the_time('F jS, Y'); ?>" <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <?php _e('Archive for','cleancut'); ?> "<?php the_time('F, Y'); ?>" <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <?php _e('Archive for','cleancut'); ?> "<?php the_time('Y'); ?>" <?php /* If this is a search */ } elseif (is_search()) { ?> <?php _e('Search Results','cleancut'); ?> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <?php _e('Author Archive','cleancut'); ?> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <?php _e('Blog Archives','cleancut'); ?> <?php } echo '</h2></div></div>';James
Posted 2 years ago # -
Thanks, much appticiated!
Posted 2 years ago # -
Hey, that was perfect, now how do i get rid of the quotation marks?
Posted 2 years ago # -
Around the title that is... the archive of is gone but there are still quotes around the title of the category. i can't seem to find that in the archive.php am I missing something or is that part of the theme in a different file?
Posted 2 years ago # -
In archive.php change:
<?php _e('Archive for','cleancut'); ?> "<?php echo single_cat_title(); ?>"to:
<?php _e('Archive for','cleancut'); ?> <?php echo single_cat_title(); ?>You can change the code for the "time" archives too.
Posted 2 years ago # -
Perfect, thanks for all your help as i sort this stuff out :)
Posted 2 years ago # -
Glad that I could help you :)
Posted 2 years ago #
Reply
You must log in to post.














