• Erica

    (@alexshields)


    How do I get rid of the title “blog archive” which shows up on every article page… I just want the title of the webpage everywhere…

Viewing 4 replies - 1 through 4 (of 4 total)
  • We aren’t psychic you know. We kinda need the URL to your blog…

    You will need to edit archive.php. In that file you’ll see some strings of code something like this one block (one condition):

    <?php if ( is_category() ) { ?>
    <h2 class="pagetitle">Archive for <?php echo single_cat_title(); ?></h2>

    This is just part of a series of them. What it’s doing is asking what kind of archive, then spitting out the proper heading (both fixed part “Archive for”, and the variable or dynamic part <?php echo single_cat_title(); ?>. In other words on this example it’s instructing the PHP server software to echo or put to the page the Category name IF the user requested a category ELSE IF this or that so on and so forth.

    What you want to do is remove the fixed part of the heading, so instead of this part:

    <?php if ( is_category() ) { ?>
    <h2 class="pagetitle">Archive for <?php echo single_cat_title(); ?></h2>

    You’ll want it to be like this:

    <?php if ( is_category() ) { ?>
    <h2 class="pagetitle"><?php echo single_cat_title(); ?></h2>

    You will have to do this to 5 lines. Category, Daily, Monthly, Yearly, Search.

    It’s not at all hard, just take your time and make sure you only remove that portion.

    Mike

    Thread Starter Erica

    (@alexshields)

    Thank you so much! this makes sense but my code looks a bit different, see here: (What I would like is title of webpage followed by story or page, ie. The Movie Site – Viggo Join’s Cast of LOTR)
    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <div id=”content_pages”>
    <?php if (have_posts()) : ?>
    <div class=”entrybox”>
    <div class=”pagesheader”>
    <div class=”pagetitlebox”>
    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?php /* If this is a category archive */ if (is_category()) { ?>
    Archive for the ‘<?php echo single_cat_title(); ?>’ Category

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    Archive for <?php the_time(‘F jS, Y’); ?>

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    Archive for <?php the_time(‘F, Y’); ?>

    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    Archive for <?php the_time(‘Y’); ?>

    Are you talking about the “things” that appear at the top of your browser?
    Then check the header.php and specifically the <title> tag.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘blog archive MUST GO!’ is closed to new replies.