Support » Fixing WordPress » Surprise Archive header appearing on page

  • Hello again….(sorry, it’s my night off and I’m trying to catch up on WP issues)
    I’m having a header appearing on my published page
    that says
    Archive for the ‘SCAMS TARGETING WRITERS’ Category

    well it is in the scams targeting writers category…but I’d rather not have that header up there, I don’t want it archived…can I make it go away?

    thanks again


Viewing 13 replies - 1 through 13 (of 13 total)
  • You are viewing a category archive… If you don’t want to indicate it’s any kind of archive, then just remove the text when it’s a category…

    You’ll proberly have something like this in the archive.php..

    <?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 the above, you’d just remove the text for the category condition..

    Archive for the ‘

    ..leaving the category title (i’d imagine you want to keep that)….

    remove this whole line?

    <?php /* If this is a category archive */ if (is_category()) { ?>
    <h2 class="pagetitle"><?php printf(__('Archive for the ‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>

    sorry..removing code scares me to pieces after the last “incident” =)


    Change that to..

    <?php /* If this is a category archive */ if (is_category()) { ?>
    <h2 class="pagetitle"><?php printf(__('‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>

    is that better?

    I don’t use kubrick, but i can’t imagine the above will have any world ending consequences… 🙂

    nothing world ending…now it says

    You can remove the funny quotes (if you like)..

    '‘%s’ Category',


    '%s Category',

    ok…but no way to get rid of the whole header eh?

    thanks anyways!


    Well yes if you want, just remove the whole line…

    <h2 class="pagetitle"><?php printf(__('‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>

    Or if you prefer, comment it out..

    <!--<h2 class="pagetitle"><?php //printf(__('‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>-->

    This is a problem that i also have been having , the archived post keeps showing, when a post is opened .

    The bad thing about this is that if you have any ads or banners on this post , they will not show when the archive post appears .
    i have to refresh the post by clicking on the title every time .

    this is also no good since the viewers will not know to refresh the post and will not be able to view my adsense or any other banner i have on that page.

    Does removing this part of code (Archive for the ‘) cause the full version of the post to appear or does it just take out the Archive header that appears?:

    Not sure exactly what is it you’re referring to.

    All i can suggest is that you consult the docs, see which files are controlling what in the template hierarchy, then make changes as necessary.

    NOTE: Ctrl + F5 in your browser to do a full refresh of the page (it could be a caching problem – also easily confirmed by using another browser and/or pc)

    If you want to modify functionaility or visiblity you’re going to have to dig in a understand the code you’re working on at some point.

    Install a few more theme’s and view them via the preview theme box, then browse to where you have problems, does the preview’ed theme have that problem… no? … compare the template files, see what’s done different…

    i was referfing to how you mentioned to remove the archive header that appears when post from the categories is clicked on to read.

    Whats happening is an archived version of the post is appearing , with this archive header sitting above the posts titlle, and with bthis archived version, there is an adsense ad missing that sits just above the title of the post , where the archive header is.

    Now … if i click the title and refresh the post , the archive title disappears and the post refresh’s with the adsense ad in place.

    Hello Intcon … i have visited your site , and i am having the exact same problem , you could note that if you clicked the title of the post and refresh it , it will refresh without the archive header.

    My problem is that i have an ad laced on that page , and doesn’t appear when the archive header version of the post is visible, only when i refresh the post by clicking the title does the ad show up.

    My dilemma is that , how will a visiter know enough to refresh the post by clicking the title , therefore rendering my ad useless and invisible to the viewer.

    Try it out , my site is
    Do This;
    1) go to the site, you will see the home page with an adsense code obve the first post title.

    2) go to categories and select a post to view , it will appear as an archive post.

    3) Now… if you click the title of the post that appears , it will refresh and the adsense ad will now be visible.

    The exact same thing happens with your site , exceptthat you have no ads on the original post.

    But as i am writing this a light just came on , and maybe , this is something to do with the fact that we are selecting the post from the categories widget , and maybe we both have to activate the recent posts widget , in which the visitors to the site are more apt to select from , and that will show the original posts and not the archived posts , i think , lets try.

    Update for Itcon

    The last post was definatley what the problem was , you should have the “RECENT POSTS” widget set in the sidebar.

    This where most visitors will access your posts.

    The categorie widgets can remain if you like, but note that when you add the widget “recent posts” to the side bar , you may find that any other widget or content could disappear despite the fact that their code are still present in the side bar editor.

    This will only happen to a widget if the widget is set as default in the theme, and if this is so you may have to re-add the widgets through the widget editor.

    Also after you have add any widgets through the widget editor(which is listed under appearance editor)you may note that any content that you have placed manually in the sidebar, such as ads banners etc. may have disappeared. In this situation , you must go to the sidebar editor , copy (or cut) any content that you have placed manually , and paste after the <?php endif ?> and before the last </div>.

    This will ensure that all your manual content , is not embedded within the added widgets rendering it invisible .

    hope this helps , it has resolved my issue


    your sage advice has once again led me to a solution. got my archive page fixed thanks to you.


Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Surprise Archive header appearing on page’ is closed to new replies.