$post_obj = $wp_query->get_queried_object();
echo $post_ID = $post_obj->ID;
echo $post_title = $post_obj->post_title;
echo $post_obj->post_name;
If you want to get more information about current page,use print_r like this
print_r($post_obj)
Hope this helps you.
echo $post_ID = $post_obj->ID;
echo $post_title = $post_obj->post_title;
echo $post_obj->post_name;
If you want to get more information about current page,use print_r like this
print_r($post_obj)
Hope this helps you.
I am very ecstatic when I am reading this blog post because it is written in a good manner and the writing topic for the blog is excellent.
ReplyDeleteThanks for sharing valuable information. Also get to know about Magento 2 Wordpress Integration Services