Ready to get started?Download WordPress


Title Help (8 posts)

  1. ladycrow
    Posted 3 years ago #

    My default set up created titles like "Post Name | Site Name," which I liked. I just want to change the home page to show "Site Name | Description"

    I don't usually play with the PHP so right now I have the home page correct but the description also shows on the rest of the pages after "Post name | site name".

    if( function_exists(is_tag) && is_tag() )
    { _e('Tag:'); }
    elseif( is_category() )
    { _e('Category:'); }
    elseif( is_404() )
    { _e('Not found'); }
    elseif( is_search() )
    { _e('Search'); echo " &quot;" . wp_specialchars($s, 1) . "&quot;"; } wp_title('');
    if( ! is_home() )
    { echo " | "; } bloginfo('name');
    if( is_home() )
    { echo " | ";} bloginfo('description');

    I'm pretty sure it's a simply modification. Any help is appreciated!

  2. Pioneer Valley Web Design
    Posted 3 years ago #

    An easy way to do this is to modify the CSS for the element you want to hide and add:

  3. ladycrow
    Posted 3 years ago #

    I literally mean the title of the page so a CSS solution isn't the way to go.

  4. ladycrow
    Posted 3 years ago #

    -bump- anyone?

  5. try to move the curly bracket } like so:

    if( is_home() )
    { echo " | "; bloginfo('description'); }
  6. ladycrow
    Posted 3 years ago #

    Nope, syntax error. I know it IS a syntax thing. I'm just not very good with PHP.

  7. how can the suggested change cause a syntax error while the code before did not?

    can you put the full code (of header.php?) into a http://pastebin.com/ and post the link to it here? - see http://codex.wordpress.org/Forum_Welcome#Posting_Code

  8. ladycrow
    Posted 3 years ago #

    Oh, it's far too late for me to be looking at this. I must have typed in the change incorrectly. It's working now. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic