Changing the syntax of the title tag on one page only (4 posts)

  1. vikkineal
    Posted 3 years ago #

    Hi can anyone help with the below, please?

    I want to be able to change the syntax of my title tag only, so need to write an if / else statement.

    I'm getting myself a bit muddled as my PHP isn't great... but basically something along the lines of the below (although a working version) would be great :)

    <?php if ( ! is_page_template('boatDetails.php') ) { ?>
    <title><?php bloginfo('name'); ?><?php wp_title('|'); ?></title>;
    else { <title>I'm a boat details page</title>;
    <?php } ?>

    Thanks :)

  2. Gaurav Raghav
    Posted 3 years ago #

    Download seo by yoast that allows easy customizable title tags .

  3. vikkineal
    Posted 3 years ago #

    Hiya - I don't want the client to be able to play with it though. I want to control it either via the header.php OR by the functions.php file.

  4. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic