You can use get_the_post_thumbnail($post, $size, $attrs)/the_post_thumbnail($post, $size, $attrs)
for print image full taq or get_the_post_thumbnail_url($post, $size, $attrs)
if you want return just featured image url.
Also you can use wp_get_attachment_image($attachment_id, $size, $atts)
or wp_get_attachment_image_url($attachment_id, $size, $atts)
for not featured images but from your media library.
Related Posts:
- Why does my custom taxonomy show a total count across all post types
- How to Debug the ‘save_post’ Action?
- set_post_thumbnail_size in percent, not pixels?
- Custom Post Type with Nested Taxonomy and Template Files
- Adding custom post types to archive.php
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- 404 error PageNavi custom type taxonomy | wordpress
- Custom Post Type and taxonomies’s labels localization not working
- get_the_post_thumbnail() returning empty string on custom post type
- Query for posts in 2 taxonomies
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- How do I create an archive page for standard posts?
- custom taxonomy archive by year
- How to check if “is single” page
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- Can custom taxonomies items have attached properties?
- WordPress if in term*
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Change custom taxonomy after certain time – CPT template
- how to delete all users and posts based on ‘user_meta’?
- WordPress Custom Post Type Navigation + Children
- can I chage url for register_post_type
- Get related posts of child term of custom post type
- Filter term taxonomy metabox in custom post type
- Use custom metabox to update automatically a post after a given date
- Show custom post archive when custom post not specified
- Show custom post type relationships by taxonomy
- CPT archive admin menu label
- Custom post type ‘articles’ ignores posts_per_page, reserved post_type?
- Remove Add Media and all Rich text editor buttons?
- Custom Posts on homepage
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Adavnced custom fields relationship query plus query inside
- To use custom post types, or not to use
- Autocomplete or suggest from post titles inside plugin
- How to make a posttype show under a page hierarchy (example.com/page/posttype/entry)?
- Convert post type to another
- WordPress wp_query() basic question about args
- How to define a term for custom taxonomy
- Make (custom) post type accessible only by custom query
- Exclude posts with custom taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- register_post_type()’s rewrite slug not working
- Get a list of all custom post type names/slugs [duplicate]
- add post meta value
- rewriterule not working
- meta query not retrieving posts
- Post format or Type for List Type Posts
- WP_Query get post from a category and from another post type
- Filtered by a custom field, ordered by another
- Slider from custom post type
- Custom Post Type View Button in Admin Gives 400 Error
- Multiple custom post types on same admin page
- Custom field only on custom post type?
- rewrite rules hierarchical
- Save custom post type not working
- Extra richtext admin textfield for custom posttype with toolbar tabs?
- Insert a Custom Post type into my Loop
- How do I list the next 7 days and any events (cpt) contained in those days
- How to get next post link of child custom post type from parent post and get next post link of parent post from the last child post?
- Get only parent post in archive post
- Using publish_{custom-post-type} hook for custom post type to update meta doesn’t work
- Filter posts by their related field’s custom field
- Issue removing columns from admin table
- Want to add new label in new post
- How to display “META” array in register_taxonomy
- CPTs relationship
- Search only one custom post type
- If ACF Post Object post has custom taxonomy term…
- Using meta boxes as the title of a custom post type
- How do I get all authors posts of a custom post type outside loop
- Customise Permalink Structure For Custom Post Types
- minimize wp_query call to database
- Make it impossible to save a custom post type with both video and image selected?
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- sorting in wp query based on custom field value
- WooCommerce breadcrumb display custom posts instead of product data
- Include images from pages in wp search.php results in default wp search
- How do i create user accounts from custom posts that have email addresses
- Taxonomy’s title
- Display all posts from single taxonomy term
- How to hide editor, but keep media library access
- Best way to use Category & Custom Fields?
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Plugin Error on activating
- custom post type plugin – single template
- Paginate custom taxonomy category with wp_custom_pagination
- Page to show custom posts and one category
- Custom post type with custom fields enabled, is there a way to set a default group of fileds?
- Storing/querying custom date data
- Custom Template Taxonomy
- How to make nested custom post type slugs work
- Checking 2 dates against todays date
- WP Build-In Post selector for CPT
- Pagination not working with custom loop
- Random meta field from specific custom post type
- How to relate one custom post type to another custom post type
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- Remote database access on another wordpress site’s custom post type