WordPress.org

Ready to get started?Download WordPress

Forums

How to insert page title? (3 posts)

  1. parakeet
    Member
    Posted 4 years ago #

    Hi,
    I want to call in the title of a page (not the browser window title, just the page name). Is this correct... ?

    It's not working

    <?php
    	if (is_page()) {
    		echo 'The city of'. wp_title() . 'is sunny.';
    	}
    ?>

    I can't figure it out, how to insert the page title in the sentence. Help appreciated. Thanks.

  2. Shane G.
    Member
    Posted 4 years ago #

  3. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    read this: http://codex.wordpress.org/Template_Tags/wp_title

    you could try:

    wp_title( '', false )

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags