Support » Themes and Templates » Function to find current page name

Viewing 3 replies - 1 through 3 (of 3 total)
  • Emil Uzelac


    Theme Review Admin

    Go to WP Dasboard, click on Pages > Edit Pages. Now after that you’ll see the list of all pages you have on your site. Just mouseover the title and you’ll see the page ID.

    Example for default About page the ID will look something like this:

    The number 2 after the post= is the page ID number.



    Forum Moderator

    When I navigate to a page (not a category – a page), then I want to display the name of the current page on the screen.

    depends on where you want to show the page title, but still give the_title() a try;
    you should be able to get the page id with $post->ID

    the_title() did it for me. Many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Function to find current page name’ is closed to new replies.