You query is completely wrong and mingled. You are using WP_Query
and get_post
together and intermingled in one query, which will never work
To retrieve just one single post, make use of get_post
. You can delete your complete query in your question. Replace it with something like this
<?php
$post_64 = get_post(64);
echo $post_64->post_title;
?>
Related Posts:
- Load a script just to custom post type in admin
- Handling front-end file uploads, considering safety and ease of use
- How to set a fall back template for a custom post type in a plugin?
- Post formats “audio” and “video” only showing in index.php
- How do I implement custom fields without using any plugins?
- how do I group content in magazine-style ‘issues’?
- Prepend regular Posts with custom slug, without affecting Custom Post Types?
- Semantic URL Custom Post Type and Taxonomies permalinks
- Pagination with custom loop
- WordPress custom post action hook
- Display metabox conditionally
- Change plugin’s has_archive = true to false?
- How to remove thumbnail sizes for specific post type on a child theme?
- Do attachments added to custom post types have a post parent?
- Get slug to point to different content of the same post
- How to make an archive page displaying posts in a date range
- Categories and Tags not working!
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- category.php displays ALL posts instead of just those with the current category
- Having a 2nd admin page for a custom post type
- Custom Post Custom Taxonomy Data Not Saving in Edit Screen
- Display Next/Prev when looping Custom post-types archive?
- List custom posts by custom taxonomy
- How to Set Post Status to Draft if older than today
- How To Enable Block Editor (Gutenberg) for Existing Post Type via functions.php
- How much control do we have over CPT rewrite slugs? Can I create a “root” page for my CPT with out the page path, and then have paths for other pages?
- Create a post in custom post type using field in registration form after users submit form
- Wrong generated page_name/slug on first publish of custom post type
- Can’t change first part of URL rewrite for custom post type
- Get all properties of custom post type
- How to avoid manage posts screen duplicates when two plugins use the same library
- Add predefined/default values to custom post plugin
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Meta Key Value in current-user-only loop
- dynamically add a custom field or metabox to custom post type [duplicate]
- How to use custom taxonomies to reference complex relationships?
- How to implement a Google map store locator
- CPT EVENT – listing by month and filtering by category and month – form select option
- custom post type WYSIWG removes paragraphs when displayed
- ACF field key/value to show on taxonomy list
- Re-registering a custom post type not working (not showing up)
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- How to edit this code to get the categories in achieve page?
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Meta Query posts not showing on ending date of custom field
- What is best way to prevent access to Custom Post Types unless authenticated when the post type has an archive and is publicly queryable?
- How does the filter post_updated_messages work?
- How to get WordPress term attached to the Post?
- How to show only the most recent post on my custom post type archive?
- How to automatically and randomly reorder custom post type?
- Adding something to the_content
- I’m having trouble getting the permalink sample on my custom post type edit page to work
- Is it a good idea to add a column to the posts table?
- How to hook WP initialization without modifying functions.php
- Is it possible to load a different sidebar in single.php based on a meta_query filter?
- Querying multiple values from a single key
- SEO Concerns With Rewrite Rules
- Empty taxonomy items for CPT in admin grid
- How to get_term_meta on single custom post?
- ArgumentCountError caused by wp-includes/class-wp-hook.php
- Assign a template to a custom post type when displayed by the main loop on the home page
- Custom Post Type API doesn’t show taxonomy or category array
- Shortcode with WP_Query more than once on one page
- is it possible in a custom post, create custom fields as well whitin?
- Display registerd taxonomy in admin dashboard
- Take stored email addresses from custom post type & turn into one string
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- How to show multiple images in a slideshow for a portfolio page
- How to eliminate custom posts where the “date” value is expired?
- Pagination in custom post type archive.php not working
- How to filter a matched value with custom key using WP REST API?
- how to display author name in custom post type
- Sort custom post column by generated value?
- create a “add icon” field in taxonomies page
- Custom Post Type Pagination getting 404 error
- How to search through all child taxonomies using WP_Query?
- Custom Post Taxonomy Template Not Loading Properly
- WordPress retrieving $post based on random key in $_POST
- How can I use one instance of page.php to display different custom post types?
- Show ajax form resuslts in page
- How to make “single post” permalink maintain it’s sub-page structure
- Unwanted URL with Custom Post Type
- wp_nav_menu doesn’t seem to work on custom post type pages
- Custom meta box in editor of custom post type not working
- Calling in Post Content via AJAX
- Multiple custom post type and permalink issue
- Using mediaelement to display gallery of audio
- Help ordering custom query by Title, Ascending
- How do I set a specific size for my image?
- group posts by month/date ignore years
- Toggle a metabox based on a selection
- Image paths on custom post types getting /post_type/ added to path
- Problems with custom post type and hierarchical permalinks
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Show custom taxonomies in admin panel under custom post type
- Trying to display next and previous set of posts on separate page (not parent page)
- How to hide home title on pages and posts?
- Limit wordpress posts loop to continue onto another page
- post__in select all custom posts and not the selected array of ids