WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to get current page id title

[Resolved] How to get current page id title

  • coder2coder
    Member

    @coder2coder

    Try this :

    $post_obj = $wp_query->get_queried_object();
    echo $post_ID = $post_obj->ID;
    echo $post_title = $post_obj->post_title;

    [Link moderated]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] How to get current page id title’ is closed to new replies.