Yes I did:
I needed
<?php if($post->post_type == 'customposttype' ){ ?>
On the next line. Several sources I’ve seen omit that.
Related Posts:
- Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?
- Is there a way to get N number of WYSIWYG editors in a custom post type?
- Why are the comments disabled by default on my custom_post_types?
- Getting the IDs of a custom post type
- Multiple custom post types under one admin menu
- CPT Template Not Showing – Getting 404
- Is it OK to move admin menu items?
- How to throw error to user when saving post
- Display text if current user has written 1 or more posts in a custom post type
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- Count post that have specific meta value
- Remove date and category filters when editing custom post types
- Display all custom post types in archives.php
- Compare 3 custom fields and sort by oldest
- How to select one major category (or custom taxonomy) for a custom post type?
- How to show posts from multiple post types in a single loop? And display them separately on the same template
- WordPress custom post type Single.php?
- how to use two permalinks for one custom post type
- Adding capabilities to default roles
- How to add page attribute “Template” to custom post
- Child and grandchild taxonomy listings – 404
- Filters post in admin with dropdown select, custom post type
- Custom Permalink Tag breaks Pagination
- Display posts if a custom field value is equal to another custom field value
- Custom Fields vs Separate Table
- Add the current menu item CSS class to a custom page type archive in WordPress menu
- Why is archive.php used for my page
- Using several custom fields as custom post title
- Why is my Custom Post Type not showing up after adding capabilities?
- Create Template for Custom Post Type same like for Page
- Return the thumbnail meta data for getter and setter
- How to create Blog Post Specific Widget
- Custom Post-Type not in admin menu
- Page vs Custom Post Types Differences/Issues
- WordPress custom post – add dynamically meta boxes
- Roles for Custom Post Types
- Having unique constraints for custom fields in a custom post type
- Make parts of your wordpress website completely built with data from external APIs?
- JS innerhtml changing style when using AJAX
- How do I add a custom screen for a custom post type to be called from custom post row action?
- Add Custom Post type menu to another menu in specific location
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- How to get custom posts sub category link
- Pretty URLs and custom post types
- Limit Search to Post Type With Apostrophe return search not found
- Specific routing for CPT
- Add a custom text to admin footer in a Custom Post Type page
- Trying to Create a PHP Variable for post_type that can be referenced Site Wide
- Custom Rewrite Rule for Custom Post Type with URL Param
- List of users that clicked a ‘Join’ button at single post
- Setting Post Title via Meta Data returns Auto-draft
- search custom post type by custom fields on front end
- category list with cutom post count
- I want to know if i can add two different custom post types to my wordpress site
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- Custom permalink not working and showing 404 page not error
- get_delete_post_link() only works for administrator, even if other user has exactly the same permissions
- Custom Post Type (CustomPress) [closed]
- Direct form to a custom page template
- Add Class according to the order of appearance
- How to know which archive page is active
- How do I add new post formats to twenty fourteen theme?
- Problem On Retrieving Post Meta Data on Custom Column [closed]
- Custom Post Type UI
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- Custom Post Type page template doesn’t show up
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- Custom wp-query display post only today
- How to filter custom post type by multiple Taxonomies
- Order custom post type by taxonomy
- How to specify user ID for a CPT wp_insert_post when there’s no actual user (it’s programmatic)
- Display Custom Post Type Based on Taxonomy With WP_Query()
- Cannot display the_content() after removed WordPress 5’s auto embed feature (iframe & blockquote)
- Permalink for specific post type
- Problem in moving cpt’s from local website to live website
- Permalink for custom post type pages not working
- Edit custom post type page with ACF repeater fields throws ‘Service Unavailable’ error
- Custom nav menu current item custom link problem
- How To Loop Through list with Custom Post Types
- How to decouple custom post types components from template?
- Custom post type cannot access child page
- Custom Post Type + Category archive
- Customizing a plugin function using a hook
- Changing custom post_type when publishing
- one get_posts to return a number of custom posts for each meta value
- Show custom post type in archive page by category
- Pop up showing same content on all posts display.
- Collection of fields in a single post
- Display and Allow users to edit their own profiles
- Get result from Custom Field in Custom Post type
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- How do I do this?: If custom post type exists, echo it, else do not
- WordPress custom post type post and category links 404
- Count of posts with meta_key filled in?
- Custom post type efficiency
- Choose custom post type template by category
- Are custom posts included when getting a categories’ posts?
- How to get lowest price from custom fields of posts
- Add post id to url instead of WordPress default -2 suffix
- How to consume external API from WordPress post editor and display the response data in the custom field?