• I’m having trouble understanding the Title PHP statement:
    <?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> ?? Blog Archive <?php } ?> <?php wp_title(); ?>

    I would like to insert:
    bloginfo('description')
    after the name statement ONLY when you are on the main site index.
    I know that i need an “if (is_page(index.php)) else ….” (or something like that), but not sure how to incorporate that.
    Any help? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The code is: <?php if ( is_home() ) bloginfo('description'); ?>

    Thread Starter jwpettit

    (@jwpettit)

    I worked on this for 30 mins, write this post, and boom…i get it. Here it is:
    '<?php bloginfo('name'); ?> <?php if ( is_home() )
    { ?>?? <?php bloginfo('description'); ?><?php } ?>
    <?php if ( is_single() )
    { ?> ?? Blog Archive <?php } ?>
    <?php wp_title(); ?>'

    Thread Starter jwpettit

    (@jwpettit)

    thanks softius!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Title PHP statement’ is closed to new replies.