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?
- 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?
- 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 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?
- How to customize a permalink (URL) structure?
- Replace text in post from cvs
- Query & Order posts by custom fields
- AJAX load more for different custom post type loops
- I need to add endpoint for wordpress categories
- 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
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Displaying custom field according to date
- Different Category system needed for the Custom Post Type
- Warning: Invalid argument supplied for foreach() [closed]
- Add additional field to custom post_type
- categories should be available across all custom post types
- PHP question: how to combine syntax?
- Loop increase number
- custom post for slider
- ACF in wordpress
- Assign category a default post type
- How to inherit field value from parent post into in child / sub post
- finding and using post type fields in WordPress
- How exclude or skip post type with get_next_post_link
- Create short URL with auto 301 redirect
- Get data from PHP to JavaScript to set position of each post on front page
- Removing full title and breadcrumb header container for a specific post type
- Is it possible to use array_walk() to append terms to an array of posts?
- Show current user posts in custom post type query
- post_content is stripping HTML when adding a new post? [closed]
- Custom post type in Custom widget – $listItem
- CPT Repeatable Fields + Undefined Index
- Function to erase every post from a taxonomy
- Excerpt length: get first paragraph
- Post type Echo code is repeating on homepage
- redirect after submiting post for review
- Create an user checklist system for a course plateform using ACF Pro and ACF Extended
- set object terms after some some time of published post – functions.php
- 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
- 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
- ACF field check value of field on all other articles
- How to convert Post Object Custom Field into Tags
- Problem with multi checkboxes value in metabox?
- Change Search display for Custom Post Type
- PHP Notice: Unidentified index
- Duplicate posts in my custom loop
- 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?
- 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
- 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?
- Comments are not working on Custom Post Type
- Send email on creation of custom post type and use get_post_meta()
- how to display custom taxonomies in front page
- How do loop categories post from according in WordPress? is it impossible to solve this problem?
- How to display *block number* instead *date value* on WordPress posts?