Forums

How do I get the title for a tag archive install properly? A quick one... (2 posts)

  1. Iva
    Member
    Posted 3 years ago #

    Hello,

    I have the following code for my title tags:


    <title><?php wp_title(''); if (function_exists('is_tag') and is_tag()) { ?>Tagged with <?php echo $tag; } if (is_archive()) { ?> archive<?php } elseif (is_search()) { ?> Search for <?php echo $s; } if ( !(is_404()) && (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?> || <?php } ?> <?php bloginfo('name'); ?></title>

    ...and I don't want to mess up PHP and get a parse error, so I was wondering how to display the title for tag pages properly? Currently they look like this:

    thingTagged with thing archive

    I basically don't know where the tag slug at the beginning comes from, as well as the word archive at the end (which, of course, I want on other archive pages) and I want to get rid of it. What do I have to do? I'd be grateful for a quick fix.

  2. Iva
    Member
    Posted 3 years ago #

    I would really appreciate an answer as I have not managed to fix this. I just do not know where the error is.

Topic Closed

This topic has been closed to new replies.

About this Topic