The is_page()
depends on how the request maps to the main query variables, so you could instead check the post type within the loop:
the_title();
if( 'post' === get_post_type() ) {
// display some extra stuff
}
Related Posts:
- A search for ‘0’ returns results
- 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]
- Identify the page being shown while in The Loop
- If Loop has odd number of posts on last page Custom style for last post in it
- If No Search Results, Show Posts from Alternate Search Query
- single page site with subpages
- How to loop through ALL pages?
- Custom search form to display users only
- Differentiate between posts and pages in search results
- 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
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- How to go about combining dropdowns / filter queries?
- Get search.php results in header.php?
- Filter the_posts doesn’t work on search page
- 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)
- How to modify search.php to not show pages only show posts
- First archive page with a few posts
- Tags on page (not post) returns nothing – why? Improved clarified question!
- Include future posts in tags and in search
- Exclude page from loop results
- Print the whole page?
- WP_Query is only looping home page, not pages
- Search page loop banner image issue
- Does search.php autofilter The Loop?
- How do i create a list-posts-page?
- WordPress: query pages except remove one page
- How do I set the Stewart Search Template to return only published posts in the result
- Trying to get all links in my posts
- 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
- Work arounds for conditional checks inside the loop in search.php?
- 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
- Eliminate duplicates in a foreach loop [closed]
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- Different date time in results of search
- How to fix pagination for custom loops?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Can I force WP_Query to return no results?
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Getting only direct child pages in WordPress with get_pages
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- How to get Author ID outside the loop
- How can i display the content in plaintext
- How to check if I’m on the last page of posts?
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Searching multiple custom post types and pages
- Is there any difference between the_title() and echo get_the_title()?
- AJAX with loop filtering categories
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- remove tags from the_content
- group search results by post type?
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- Should I use loop in the single.php file?
- Why do themes rely on “The Loop”?
- How to return loop contents
- Cleanest Way to Select Every Second Element in a Loop?
- Insert image or ad script after 3 posts using the loop
- Get date of last update outside of loop
- Pagination not working on home page
- How to place comments_template(); outside the loop?
- Multiple Loops Homepage?
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- How to get the first image gallery of a product in woocommerce in a loop
- save_post + insert_post = infinite loop
- Loop.php vs looping inside template file
- Get ID of a page containing secondary loop in content
- Manual excerpts for pages not working on Search