Try this way, may help you. I just fetch from a specific post ‘s image from a specific Post Type called “gameshowwarriorsw”.
$gameShowWarriorsWorld = new WP_Query( 'post_type=gameshowwarriorsw&orderby=date&order=DESC&p=371' );
while ($gameShowWarriorsWorld->have_posts()) : $gameShowWarriorsWorld->the_post();
$postTitle = get_the_title();
$postid = get_the_id();
$postContent = get_the_content();
?>
<li> <a href="#" onclick="return get_inzenwarriorhero(<?php echo $postid ; ?>);">
<?php the_post_thumbnail(array(219,143)); ?>
</a>
</li>
<?php
endwhile;
wp_reset_query();
?>
Related Posts:
- get_post_meta not working on publishing
- Let users upload image(s) to the post from front end
- Display a query with multiple post types and same relationship on a single page
- Custom post status not working
- Search that will look in custom field, post title and post content
- clients list using wordpress
- echo value from ‘select’ field type into page template using cmb2?
- Date archives for custom post type
- How can I add dropdown widget/box to admin post page?
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Saving multiple Metabox contents
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- Custom post type loops with different page templates
- WP insert post PHP function dynamically generated Custom Fields
- Limit Authors to their Own Posts on front-end excluding admins
- Append taxonomy terms as class names in markup?
- How do you output custom code between posts in the loop?
- Conditional to modify query results
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- Output custom post shortcode. Help spot the error.
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- GravityForm: Populate Dropdown with custom post type [closed]
- Create a random unique 6 digit number as custom field for custom post type
- Loading all files within a directory
- Using several custom fields as custom post title
- Create a post in custom post type using field in registration form after users submit form
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Copy custom field value to post title
- What’s the difference between same wp functions get_posts(); functions in different form?
- How to customize a permalink (URL) structure?
- Replace text in post from cvs
- Can I list a custom post type within another custom post type in the admin area?
- Query & Order posts by custom fields
- Set URL link to featured image of custom post type
- AJAX load more for different custom post type loops
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- Redirect 404 page with ID in slug to associated page with same ID in slug
- WordPress wrapped added a span tag to every single p tag
- ACF field key/value to show on taxonomy list
- Using custom field content as expression in IF statement [closed]
- Hide a widget inside a div on specific type of post
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Cannot save CPT meta box
- Excerpt length: get first paragraph
- Post type Echo code is repeating on homepage
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- How can I sort the order of multiple custom field values in a custom post type?
- How do I ensure that post_type and Taxonomy use the same slug?
- redirect after submiting post for review
- Create an user checklist system for a course plateform using ACF Pro and ACF Extended
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Custom Form / Search with Custom Post Type Data
- Custom fields array to display it monthly
- set object terms after some some time of published post – functions.php
- php dynamic content inside shortcode
- update custom taxonomy custom fields
- Alike Shortcode using in Custom Shortcode
- Query custom post type that has a serialized relational advanced custom field value
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Check that a slug is present in the get_terms request
- Pagination not working in custom post type. Help
- How to add specific terms in a custom post type?
- Assigning categories to custom post types via a front-end form; only works for native post type
- Sort custom post column by generated value?
- when looping through custom post data not appearing
- Limit custom post type to the authors only on front-end!
- Create posts inside CPT post
- Persist meta box choices throughout all posts of same post type
- ACF field check value of field on all other articles
- Populate custom post type/custom fields from an external database
- Custom Field to post_title
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Featured image in custom post is being disabled
- Can’t pick up a field created with Advanced Custom Fields
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- can’t see categories in appearance-menu-categories
- Get month and day from a Date Picker custom field
- Show Custom Post Type taxonomy term that matches custom field
- Order by custom field attribute
- I want to split this into two functions
- Select Menu for Custom post Type does not save
- Custom Loop for custom post type. Compare by meta_value?
- Allow authors to create article image
- Code in custom widget queries all posts, when it should only query the current post
- Add HTML before a specific div?
- How do I filter a custom post type loop by a field?
- How to string lines from the_content() hook in WordPress?
- Get custom post fields and display them
- Comments are not working on Custom Post Type
- How to I add count of custom posts listed in a post as a prefix to its title
- Send email on creation of custom post type and use get_post_meta()
- how to display custom taxonomies in front page
- add_rewrite_rule not working with custom post type
- How do loop categories post from according in WordPress? is it impossible to solve this problem?