WordPress.org

Forums

[resolved] How to get current page id title (2 posts)

  1. coder2coder
    Member
    Posted 3 years ago #

    Try this :

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

    [Link moderated]

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Please stop posting code snippets just to advertise your own blog.

Topic Closed

This topic has been closed to new replies.

About this Topic