I reckon you use the image URL in your custom field.
$metro_creativex_posttitle = get_the_title(); // Not used in this snippet
/*
// you don't need this block
$metro_creativex_feat_image = wp_get_attachment_image_src(
$post->ID,
get_field('sd_single_img'),
'single-post-thumbnail'
);
*/
// you'll need `$post_id` for each song
$img_src = get_field('sd_single_img', $post_id);
if( !empty( $img_src ) ) {
// echo if custom field is not empty
echo '<div class="img"><img src="https://thenewblackgold.netsons.org/wp/category/songs/level-5/' . $img_src . '" /></div>';
}
Updated in compliance of the OP comment.
Related Posts:
- Can I set a default featured image for a category?
- Order get_terms() By Custom Field
- How can I add the featured image functionality to a custom taxonomy?
- How can I make post fields required in WordPress?
- get_field not displaying my custom field value
- Add extra fields to Add New Category page
- Need help adding custom field to category
- adding custom fields to next and previous post link
- Custom query with category exclusion and post-meta “whitelist”
- How to add a background image to category and display image on category page
- Sort category page with custom field
- Create a full width responsive header image per page
- Return category slug / title from category ID
- Filter out posts before display category count
- How to put enctype=”multipart/form-data” in categories form?
- Add custom taxonomy under the category title
- Display the featured image from the last post
- Different excerpt styles per category, but chronological
- Display child categories in WooCommerce
- How to make a Thumbnails Mosaic
- How to change post featured image using a custom field of category?
- Display category name on featured image in wordpress excerpt
- How to call custom category field data in theme?
- Category index featured image
- query in category.php repeats itself
- need to add custom field in more products
- Retrieving category’s color with get_term_meta
- How to change a post category when the ACF datepicker Field is today
- Listing Texts of Which Custom Field is Null
- How to “group” (categorize) the Pages together?
- How to query categories with Advanced Custom Fields?
- Redirect to another page using contact form 7? [closed]
- Display thumbnails for certain category posts
- Random Featured Image Based on Category
- How to add custom color fields to the category edit page?
- Notice: Trying to get property of non-object in : custom fields category
- echo get_post_meta of all post in a category to fill up a select field
- Category images are not displaying in WordPress
- why get_the_post_thumbnail( the_ID()) echos extra post id
- “Virtual category page” based on a custom field filter
- ACF no print data [closed]
- Random category with recent post title and thumbnail
- How to add icon over specific thumb
- Displaying a custom field in Category Archives
- Display post thumbnail for specific category outside the loop
- Assign a custom post to a custom taxonomy based on custom field value
- Custom Fields Value As Taxonomy
- Update custom category fields front-end
- How to add image for all posts associated to specified category?
- What is the best way to add an advanced / intermediate / beginner tag to a post
- Show posts from category specified using a custom field
- Adding tinymce to Custom Field boxes on Category edit page
- How to display WooCommerce category image in my category page banner as a background?
- How can i add service category here? [duplicate]
- Sort categories by custom field in WordPress admin
- How to make product image inherit from category image
- show thumbnail for subcategory wordpress
- Modifying category order
- Displaying data from custom fields on a specific category page
- How can I add different custom fields for each category in the same post?
- How to display custom fields as table in Woocommerce
- How to modify custom category field from front end?
- How to hide/remove featured images in particular categories post?
- Ajax Category add doesn’t update the list table custom column
- How to Manage and link certain custom taxonomy?
- How to loop through a custom field for each post, & display?
- $args Orderby The number
- ACF plugin categories bug in WordPress 3.9
- How to enable admins/editors to set a featured image for specific category?
- Formating content in category.php
- Logic for Nearby places with post and categories
- Sort categories by meta value
- How to structure Multisite sites into categories?
- Featured image for links and categories
- Custom Fields to Category edit page, then displaying them in a template correctly
- How do I add and display a custom image field to a category? [duplicate]
- Show thumbnails 1-12 of category x on any given page
- Converting Categories (with ACF fields) to custom taxonomies
- How to display the category featured images [closed]
- How Do I Add HTML Support to the Additional Category Description Field?
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- Add custom text in second paragraph of posts in specific category
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Is There a Difference Between Taxonomies and Categories?
- Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?
- List all subcategories from category
- How To Find Out WordPress Category Table in MYSQL?
- Add custom field to Category
- Get Category ID inside Category template
- Only one category per post
- WordPress Multisite – global categories
- Get the children of the parent category
- Get posts from sites in Multisite?
- WP REST API: filter by category 1 AND category 2
- How To Get Parent Category Slug of Current Post
- Display All Products by Category with WooCommerce
- What is the difference between a “tag” and a “category”?
- Is there an easy way to make a meta box have the tabs like the Categories meta box has?
- How to check if I’m on the last page of posts?
- Display posts from the same category using next/previous post link