I believe you want get_queried_object
. That will return information about the page per se and not necessarily about the posts/pages being displayed in the Loop.
Be aware that it returns very different information depending on the type of page you are one. It will return user information on an author archive, for example, but category information on a category archive, and sometime it returns NULL
.
Related
Related Posts:
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Child Pages Loop
- Get post by page name or slug
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- Display subpages under parent page as a list within a loop
- Is including the loop necessary for page.php? [duplicate]
- If Loop has odd number of posts on last page Custom style for last post in it
- single page site with subpages
- How to loop through ALL pages?
- Loop and Page template : my WP_query don’t take args
- Create a loop that gets pages with their template
- Display content of page template (get_page)
- Loop after page content
- wp alchemy multiple image uploader output images to template
- Get Page content to displayin Bootstrap Modal
- How do I make a variable available inside partials?
- Exclude page name from loop
- Stepping through a foreach loop – adding +1 to the end of it so next time it loops it starts on item 2
- Include multiple page ids in loop
- Get post offset/posts page offset in single post page (outside the loop)
- First archive page with a few posts
- Tags on page (not post) returns nothing – why? Improved clarified question!
- Exclude page from loop results
- Print the whole page?
- WP_Query is only looping home page, not pages
- How do i create a list-posts-page?
- WordPress: query pages except remove one page
- Archive: Lists itself
- is it bad to copy the loop for a template?
- Get top Page IDs from menu and cycle through their child pages on a scroller
- Search – Check if post is a page on search page
- Structure and Display Content from Multiple Pages on Single Page
- Making a specific page wordpress compatable that is not index
- Default Template infinite loop of Title
- Have multiple loops on a page appear after/between page content
- get_template_part() to render single page Theme
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- Counting the posts of a custom WordPress loop (WP_Query)?
- Get post content from outside the loop
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- Pagination not working on home page
- Get ID of a page containing secondary loop in content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- How to find meta_values to call
- Previous and Next Post link doesn’t work
- In a foreach loop, how do I target the last item in the loop?
- Users instead of posts: How to modify the main query?
- Pagination gives extra page with no results
- Better way to display posts from specific categories, in a grid layout
- Infinite Redirect Loop after moving to subdirectory
- WordPress Loop – Not returning projects in specific category
- Next and Previous loop
- Query reset problem or flawed code to enable custom post type query
- How do I order my loop query?
- Exclude posts from main loop based on meta value
- trouble calling an import class from an action in a plugin before wp_cron executes
- How can I paginate this?
- Obtain page data and use regular loop
- How can I load posts starting from, and including, the current post?
- How to fix pagination for custom loops?
- ‘Auto Draft’ Post showing in wordpress loop
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Display Posts on Custom Page
- Multiple get_posts() queries on one page
- How to include custom post type posts on a page?
- Change date format
- How to stop the continuation of posts on the second loop from where the first ended
- In Custom page – next_posts_link Not working while previous_posts_link is working
- Escape current post from loop
- Why isn’t my multiple loops working?
- How do I display the latest posts from three different categories?
- facebook like, tweet and google+1 buttons inside the loop on home, archive and search pages and missing facebook like buttons
- How to print redux gallery feilds id? [closed]
- Why the first with flexslider appears as blank on my code?
- Rendering pages
- How does the loop know which post to view?
- How can have a conditional template tag based on the main loop within a secondary loop with new WP_Query(), using get_template_part()
- Reset Loop get_posts();
- How to filter posts by category INSIDE the loop
- Custom Header added within Dashboard pages, is this possible with custom template files?
- Loop order issue with Ajax filter
- Adding a second loop breaks everything
- Custom Query with Sticky Posts
- I want to load post in bootstrap Modal dynamically
- Return only one post format in index.php [duplicate]
- Modify widget to output posts in custom order
- How to execute custom loop before loop content?
- Limit article to 100 characters. Can’t use the_excerpt…
- Return only content in excerpt field in loop
- This webpage has a redirect loop issue with SSL page
- Buddypress Group Activity Loop Filter activity type [closed]
- get_posts and wp_autop (remove filter)
- Trouble preventing duplicate posts between 2 loops on homepage
- $do_not_duplicate is not working in genesis theme
- Loop displays current page
- Divide loop into several columns based on post custom field and enable infinite scrolling
- Query Loop Block: possible to restrict just child pages?