Use just the functions, not the object properties:
if ( is_post_type_archive() or is_date() )
There are many conditional functions (returning TRUE
or FALSE
) for exactly these cases.
Related Posts:
- How do I place content on archive pages but not on main page?
- Output yearly archive within a page
- Custom archives function
- How to filter by date & a specific custom post type post-WP 4.4?
- Custom post type archive page thinks I’m not logged in
- Get posts from a top category and group by child categories
- I created a normal page, but the page displays as an archive page
- How to get the Custom Post Type Archive inside a folder
- Combining custom taxonomy posts with default posts on one archive page
- Custom archive pages without “the loop”
- Custom post archive page not opening 404 page
- Change Title Based on Taxonomy Filter in archive-{cpt}.php
- How can I lock down an old wordpress install I don’t intend to update?
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Proper way of making custom post type landing page or archive page
- WordPress Posts By Date/Day?
- How can I get the Month Name from Archive?
- Custom Post Type Archives with 0 Posts Redirects as 404
- Archive widget – limit number of months to 12
- Exclude custom function content from certain pages
- Including post_type = ‘wiki’ in author archives
- How to show specific year archive into dropdown list
- Custom post type archive sorted and grouped by date in post meta field
- How to get the date dynamically from archive.php to date.php?
- How to make a custom Archive Page
- how do I get the date in a date archive page
- Arrange and separate posts
- Archive pages for posts based on their taxonomy?
- Custom-post-type-archive: posts sorted/filtered by year?
- Preview Post/Custom Post types in Archive
- if there is only one post in the category, directly open
- How to disable monthly archive
- Display Footer Shortcode Different for Logged In Users
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- How to Create Custom Archive page
- How to show year/month archive including months with no posts
- Displaying Archives List
- How to disable pagination (next/previous links) on post type archive?
- wp_get_archives() display months even if there is no posts
- how do I encode links to specific archive searches?
- Some archive by year page return 404
- Conditional Tags Based on Previously Viewed Posts
- How to display custom post in archive section of the wordpress page?
- If one taxonomy contains the same term as another then display post
- Checking if a specific date archive is being displayed
- Filter post by clickable year [duplicate]
- Custom Post Type Archive template page not found
- Wrap the “show_post_count” between div
- Conditional for a Single Post That Belongs to a Category?
- Is a list page usually called an archive page in WordPress?
- I want my yearly archives to show a list of all posts
- How can I use archive-{post_type}.php theme template?
- Return the name of the post type
- Why might conditionals not work on a page?
- Add class to DIV depending on page loaded
- Archive page showing wrong month
- next_posts_link and previous_posts_link problem
- Create an archive listing based on meta array
- Can’t Access Sessions or Variables through pages
- How to make an archive page template using WordPress 3
- How to Get The Excerpt of the page that displays Blog Posts
- Where is the content that is outputted by get_the_archive_description()?
- Secondary WP_Query being overriden in archive page
- How can I create a new menu item that links to an archive of a custom post type?
- Multidimensional Array
- Create a custom URL for blog archive
- Show Daily Archives after specific dates
- How can I create a master archive?
- Over 500.000(!) unwanted archive pages, major duplicate content problem
- Is possible register two archive pages for single custom post type?
- Link back to (paged) archive and find the correct page
- I want to be able to access archives to see how recently a post has been read: How can I do that?
- How can I check the rewrite slug of current post type listing page
- Overriding the template files using a plugin for all themes
- Modify wp-login.php Labels Conditionally Based On Referring URL
- Custom Post Type archive page listing a 404 or single post
- google index an Post type page I do not want
- How to remove or hide archive page?
- How to display archive by selecting year and then selecting month
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- How can I modify wp_get_archives() to not use archive.php template?
- Archives widget doesn’t work?
- Stop Custom post type from being searched via URL
- Yearly Archive Page?
- If Month=Particular month display content [closed]
- Help with if else statement for separating content from image attachment
- Custom post type category page not working
- date.php shows only three posts’ title. how to fix it?
- paging is not working properly on news archives page [duplicate]
- How to edit wordpress post without republishing
- Is each issue of a magazine site a static page
- How can i display in themplate file only a few post
- How do I add a nested conditional within an echo – to use a default image if there isn’t one in the post?
- how to hide all posts under one category
- Pagination not working for archive
- Remove plugin’s custom post type archive page and single pages [closed]
- Filter the post listing for a particular category from archive month list
- Weird html output of single_cat_title – is not inside of the html element?
- How to display the archive for native posts
- printing taxonomy and meta fields values