Try this…
<?php //prevent this div from displaying for pages:
if ( get_post_type() != 'page' ) : ?>
<div class="searchdate"><?php the_time('F jS, Y') ?></div>
<?php endif; ?>
The is_page()
conditional tag only checks if currently displayed content is a single page view. Nothing for you at this point. See http://codex.wordpress.org/Function_Reference/is_page
Related Posts:
- Why do I need to use The Loop on pages (inside page.php etc)?
- posts page – different lengths of excerpt
- Multiple loops in same page, without duplicate content
- Search widget breaks when using multiple loops?
- Private Posts/Pages & Search
- page.php showing loop of posts and not page content
- Multiple loops are not reset
- Display Posts on Custom Page
- Multiple Loops Breaking Pages
- How to add add more properties to WP_Post object in search results loop
- Total number of posts in query (category/tag/author/search results/main page…)
- WordPress Query Posts From Category Post on Static Page
- Pagination for normal (standard) posts on a page with a custom loop?
- Changing wp_link_pages() to “Next Page” and “Previous Page” buttons?
- posts going to 2 pages/categories only show up in 1
- What would causes search to return incorrect results?
- I want to add another search box on posts page in dashboard
- How to show only homepage in google results instead of privacy, contact pages
- How to distinguish pages created by woocommerce?
- Posts are not showing up on next page.
- Where are my posts linked to? I keep getting a Not Found Error, and I have no single.php page
- Related posts by searching post tags of single post as terms
- The loop: more posts than I want to fit on one page
- Redirecting posts in WordPress to a specific page
- When and how will php code in a user made WordPress page be executed?
- What function does the loop of displaying posts?
- Grid post page on WordPress with Bootstrap, the_excerpt(); Problem
- disable Tab post on nav-menus page (Admin)
- Showing categories and subcategories with posts
- Second get_permalink inside loop points to wrong URL
- Get the amount of posts on a current page
- Loop parent terms {display posts} AND loop child terms {display posts}
- How to add a class to each individual post?
- Proper way of establishing custom landing pages in WordPress
- add bootstrap post slider with tabs
- is_page Funtion for Posts ?
- Custom taxonomy archive page problem
- is_page() and is_page_template() not being differentiated
- Admin – no Featured image choice in create new/page|post
- How to detect when admin user is on the All Posts page?
- Loop don’t work within single.php page
- Use Click Image to Play Youtube Video in a WordPress Loop
- static landing page leading to author specific pages w/ “live” content
- older blog posts not showing in new theme
- How to get posts published on the latest date?
- The_excerpt() doesn’t parse – how to change that?
- Trying to edit archive.php to only show post extract, with featured image
- Add Blog to WP homepage Manually
- How can I remove the first two words and shorten get_the_title()
- How to only publish posts with image in it
- How to show all posts by author on buddypress profile with navigation
- Custom Permalink Structure for Pages & Posts
- Getting a “404 Not Found” error when “Preview Changes” is clicked
- Why won’t pagination work?
- Page and post loop same template
- How to create a “latest news” page showing a list of posts from blog category
- ACF to select posts not displaying on blog page
- Add custom text automatically on each post
- Getting blog pagination to work on page set as front page
- Extracting relevant tags associated with that particular single post only
- How do you search for a post or page with a certain url on the WordPress admin panel?
- Make loop inside slider divisible [closed]
- How to add some html formated text to every new post in WordPress
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- See if a post has a specified tag
- Why this function doesn’t works without the_post?
- Display current post position in Elementor Posts widget
- Intercept page request and add value to it
- WordPress 302 Redirect to Random Product/Post/Page
- Loop through posts? Want to remove extra newlines in actual post HTML/content on backend
- Output Post with ACF Fields into other Post
- How to create a page that shows the last 10 posts?
- $_GET parametters not working in an specific template
- WP_Query: Show 10 posts in date order, first three random
- New Posts and Pages Won’t Save
- My Custom Post Type Still Using index.php
- get_children returns older images
- How include css class based on post ( in loop ) slug?
- Posts and Pages: 404 Page not found
- WordPress Loop: How to display recent posts in multiple divs
- Querying another post category to match current post and display in loop
- How to display posts on custom page without declaring a posts page in reading settings?
- the_content() Not Grabbing All Content
- Show posts by quarter
- Display Featured Posts Grid on Static Page (Gazette)
- separate the post of a category by subcategory
- Detecting current page from class method
- How to display post list in a table layout (multiple queries in single loop)
- Having pages after specifying post_type post
- Cannot implement byline into posts container in single.php
- Not all posts showing in query
- how to handle the loop using filling bootstrap grid structure?
- Unabled to Change Permalinks – Even Using the “Edit” (Resets to Original Permalink on “Update”)
- Optimizing the blog loop
- How to check if there are posts with the same tag
- List all posts, pages and custom post types in admin
- WordPress loop not working on static front page
- Make ‘blog’ page show content as well as posts underneath it
- I don’t want the complete article to show on homepage
- Accessing Post ID Within Loop