Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4529

    Is it possible to remove the ‘Archive of’ on all the category pages globally, so that just the title of the category shows?

    #46688

    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

    #46689

    Thanks, much appticiated!

    #46690

    Hey, that was perfect, now how do i get rid of the quotation marks?

    #46691

    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?

    #46692

    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.

    #46693

    Perfect, thanks for all your help as i sort this stuff out :)

    #46694

    Glad that I could help you :)

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

The topic ‘'archive of' on category pages’ is closed to new replies.