You probably want one of the conditional tags.
Possibly is_single()
, or maybe get_post_type() == 'post'
depending on how complex your setup is.
Related Posts:
- How do I represent ‘chunks’ of content within WordPress?
- Blog posts on one subdomain, pages on another
- How can I import users into WordPress?
- Stress testing WordPress
- Can I use wordpress for a non-blog site?
- Can I / Should I use WordPress as a CMS for my Flash application
- WordPress as Backend, Laravel Front End: How to connect Routes?
- What is a good way to present templated content in WordPress?
- Using wordpress for a four-page website may be an overkill?
- Searching Only Blog Posts From a WordPress Site’s Main Posts Page?
- WordPress product catalog site [closed]
- What are the advantages of WordPress over other systems?
- Putting main WordPress blog under a different folder name
- Is a complex site possible with WordPress?
- Convert link in WordPress 3.2.1
- WordPress for a business catalog site
- Why are wordpress posts not hierarchical?
- WordPress as a CMS – best way to decouple publishing/front-end
- Updating my wordpress CMS to 4.7 gives me a blank HTML area during the upgrade process
- How to display only posts assigned to a particular, isolated, subcategory
- Custom post type content using custom fields without template
- Advanced templating / WordPress as a CMS questions
- Content management for static pages
- WordPress in Drupal
- Advantages of wordpress theme vs wordpress as a backend only [closed]
- Is wordpress truly capable of anything other than blogging? [closed]
- WordPress as template engine
- Is wordpress a library with a default GUI?
- Editing Code for CMS *** Fixed – my own stupidity – I appologise and thank everyone for their help [closed]
- Show a different link based on IP
- Can I manage content of my custom site using wordpress?
- Get Drupal user into WordPress
- How do I add open graph tags? [closed]
- Can’t access Dashboard after WordPress 3.3 Update?
- Heterogeneous content on a page
- Best way to create a page outside of the pages list
- Multiple editable content on page
- Set a WordPress website’s language without affecting the back-end
- Can WordPress used as a CMS? [closed]
- C++ Templates – LinkedList
- What’s the difference between home.php and index.php?
- Can’t get a custom template taxonomy page to display
- Check if a menu is empty?
- WordPress Template Engine?
- When calling wp_title(), do you have to create some kind of “title.php” file?
- On Taxonomy Template page, want to add Post_Type
- Custom post type loops with different page templates
- Stream Video Player does not work with do_shortcode()?
- WordPress ignoring specified template for front page. Why?
- How does wordpress blocks?
- WordPress removing data attributes for scheduled post
- Subpage template
- Multiple templates for a custom post type
- How to override wp-admin styling
- Change author slug and functionality
- WordPress shows registration link for non logged users
- How do I add a new template to my site
- create-guten-block in wordpress theme?
- WordPress Custom Post Type Children Template
- Redirect template based on permalink rather than $wp_query
- How to insert category list into post creation page, and retrieve chosen categories?
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- Trying to display short code content in template file with do_shortcode()
- Trying to create a template without navigation and footer
- Run a jquery script on on a certain template page
- Removing WordPress Footer -without access to PHP code?
- Why still output /wp-content/themes/twentynineteen?
- Different Templates for Woocommerce Parent and Child Sub Categories
- Force a specific template as default
- Custom template for sub-sub-categories
- Post repeated when opening in overlay, how do I solve this? [closed]
- add jquery file if a certain page is included
- Query the database after get_header() has been included
- How to render the single post template with the post name?
- new custom theme – posts displaying on top of one another
- Translate custom template with WPML
- Custom /Page/2/ Template Only
- How to call php file in theme directory from plugin
- Display ACF category image on archive and single template files
- WordPress 2022 template, how to see the blocks added in post template on post edit?
- How to insert “get_template_part()” based on Category ID?
- Display metabox galleries on specific page template in admin editor
- Is it all right to put the whole tag into template_part file?
- How can I include ALL post types in the_post_navigation() links, not just current post type?
- Attachment URL for an image is loading direct image file
- Custom WooCommerce template for product
- I’ve installed example data on Nominee template but the published site shows another version of the site
- If is_page elseif is_page not working like I want it to
- WP Enqueue Script Error
- Custom Template doesn’t output result when set as homepage
- Can I organise my custom post types by page?
- Inserting javascript file into theme template?
- Displaying Child Page’s Information
- Will this js code work in a page template?
- WordPress is adding above html
- Display DISQUS on homepage
- files disappearing from template
- How to load/include category templates based on conditionals?
- why does blog page ignore template [closed]
- WP Job Manager – Show recent jobs as cards