Forums

[resolved] How to get rid of "Archive for the...category" text? (8 posts)

  1. kalibahlu
    Member
    Posted 1 year ago #

    Can I get rid of the text at the top of the page that says "Archive for the (name of category) category"? I tried deleting the line that looks like it should be the one in the archive.php file, but I guess I did it wrong... didn't work. Anyone know how? Thank you for your help!

  2. Alex Mansfield
    Member
    Posted 1 year ago #

    What theme are you using?

  3. kalibahlu
    Member
    Posted 1 year ago #

    Thank you for your reply! I'm editing kubrick.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try removing:

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
     	  <?php /* If this is a category archive */ if (is_category()) { ?>
    		<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
     	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    		<h2 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
     	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
     	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
     	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
    	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h2 class="pagetitle">Author Archive</h2>
     	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h2 class="pagetitle">Blog Archives</h2>
     	  <?php } ?>

    in archive.php

  5. kalibahlu
    Member
    Posted 1 year ago #

    That was it! Thank you, esmi. Before I removed too little and then too much, but your solution is just right :)

  6. kalibahlu
    Member
    Posted 1 year ago #

    Oh, do you know how I might be able to move the text up a bit to get rid of the extra space that's where this "archive for..." text used to come up? Thx!

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    You'd need to edit the theme's stylesheet. Or you could try changing:

    <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>

    to:

    <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

    which would give you slightly better SEO.

  8. kalibahlu
    Member
    Posted 1 year ago #

    That looks better, thank you :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.