• Hi,

    With some help from all of you wonderful forum posters, I’ve come up with this for my header’s meta-description:

    <?php if( is_home() ) : ?>
    <meta name="description" content="Web Design, Web Development, and Search Engine Optimization in Columbus, Ohio" />
    
    <?php else : ?>
    <meta name="description" content="<?php the_excerpt() ?>" />
    
    <?php endif; ?>

    Now that I’m adding Ultimate Tag Warrior, I wanted to insert another condition that I thought would look like this:

    <?php if( is_home() ) : ?>
    <meta name="description" content="Web Design, Web Development, and Search Engine Optimization in Columbus, Ohio" />
    
    <?php if( is_tag() ) : ?>
    <meta name="description" content="You are now checking out all posts about <?php UTW_ShowCurrentTagSet('tagsetcommalist') ?>" />
    
    <?php else : ?>
    <meta name="description" content="<?php the_excerpt() ?>" />
    
    <?php endif; ?>

    But the whole site just breaks when I put that in… what am I missing?

    Thanks soooo much to anyone who can help…

    Brad

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘need help with php if/else’ is closed to new replies.