Viewing 3 replies - 1 through 3 (of 3 total)
  • 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:
    /wp-admin/post.php?post=2&action=edit

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

    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

    Thread Starter nosmalldreams

    (@nosmalldreams)

    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.