Use get_query_var( 'post_type' )
instead of get_post_type()
.
Related Posts:
- Query by post title
- Marking future dated post as published
- WP insert post and custom taxonomy
- Assign a Custom Role to a Custom Post?
- Implementing “Video of the Day” Feature?
- echo value from ‘select’ field type into page template using cmb2?
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- How to quickly switch custom post type singular template?
- Post metadata deletes itself
- Genesis Child and Custom Post Type
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Separate Custom Post Type Taxonomy by Comma
- CSS for Custom Post Types
- How can you use custom types/taxonomies? [closed]
- Display “Post 2 of 4” on single post page?
- Query post types with multiple keys
- How to generate a sitemap with custom posts (not Google XML)
- Turn query string to sub page
- How to make post sticky in the admin page?
- Custom post type custom taxonomy archive page name
- rewrite custom post type slug in wp admin
- Displaying the type of post (Custom) in a single.php
- If Statement – if current post is a child of a post with a taxonomy
- Unable to retrieve any posts of CPT in wp-admin
- Custom Page that comes with preloaded content for the user
- Automatically update custom field in all posts of a custom post type
- Rewrite slug for CPT
- Custom post type templating problem
- How to set up a post word limit for a custom post type
- Register widget only page is a singular of custom post type
- Which post does a taxonomy term belongs to?
- Remove the parent slug in a CPT URL
- Custom Post Type – No Results Found
- Including metaboxes from custom post types in global search — continued
- Fixed values for same post translations
- How to produce a sub-page-system in WordPress
- WordPress custom taxonomy template not working
- Custom posts type for individual pages?
- help
- Custom Taxonomy not displaying all post
- How to Display Posts From Category Within a Custom Taxonomy?
- post-per-page and offset not working
- Create field of Custom Post Types
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- When updating non-public custom post type it says “Post updated. View Post”
- Published post auto change status to pending after 90 days
- How to retrieve all wordpress posts (specific type) inside a function in php?
- ACF for custom post type archive pages: which hook to use?
- Pagination hitting 404 page on /page/4
- Custom Meta Box returns no HTML
- How to migrate Custom Field Template to a WordPress Multisite
- Automatically update slug with latest title within custom post type [duplicate]
- Post Type Support Array Not Working
- How to list top 5 custom post types depending on comments?
- How can I get some of a posts meta data whilst it is still inserting?
- Archive page for custom post type and custom taxonomy
- Custom loop to query posts with no featured image and/or no post editor content
- Improve Custom Post Permalink Structure
- Custom post type ‘Show on screen’ didn’t apply to number
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Creating custom post type and taxonomy archives and pretty URLs
- Show 10 newest post for each value of a custom taxonomy
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- How to customize custom post type’s list table?
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- Query to show post current day
- Using ACF values in nested WP queries for CPT with date values in the past
- SELECT custom post type and its meta in SQL
- Trying to list years (for a filter) but not all years display
- CPT tags not showing when editing post
- Custom post type single page returns 404
- Persist meta box choices throughout all posts of same post type
- WP_Query with all posts in one custom post type and only posts in another custom post type with a specific category
- Assign for all post of a post type a specific single-post template
- Display custom tax in “while” loop
- Show posts under a selected custom taxonomy term
- Custom post type archive false is not compatible with breadcrumbs
- Overriding a CPT template file through functions.php
- Wrong post ID in meta box callback
- Linking Taxonomies
- help me to display featured image of specific post by post id
- How do I retrieve the title of a term of a custom post type with custom taxonomies?
- 404 custom post type
- Displaying WordPress Parent field in child post
- Get number of posts by a user (draft, pending review & published)
- How can I generate a list of post-type specific categories?
- Custom post tag images not displaying with ACF
- Publish post and create additional posts with same content
- Custom WordPress URL
- How to assign custom post template to its custom taxonomy terms
- Excluding top level from taxonomy and post loop
- Paginating custom query on category template
- New WP_Query not isolating custom post types on front-page template
- Get a list of categories ids
- Styling first post using Advanced Custom Fields
- Pagination not working on homepage
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]