How about this?
<?php $meta = get_post_meta( get_the_ID(), 'region', true );
if ($meta == 'NA') { ?>
<img src="https://www.esrnetwork.com/wp-content/uploads/2016/12/NA.png" width="25" height="25"/>
<?php } elseif ($meta == 'EU') { ?>
<img src="https://www.esrnetwork.com/wp-content/uploads/2016/12/EU.png" width="25" height="25"/>
<?php } else {
} ?>
Related Posts:
- How to get Post sidebar & footer including html like get_the_content() which only gets content section?
- What’s the best way to use the Featured Image for responsive web design?
- Adding a custom image upload size and making it selected by default?
- Hide custom image sizes from media library
- Create Image Uploader for Widget
- Show content if parent page has children
- Admin Media grid view images won’t load
- WordPress remove EXIF Data from specific Thumb
- How to resize image on client-side before upload?
- Adding Featured Image to Post programatically
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- Conditional statement for parent, child and grandchild pages
- Get a Page’s attachments in Gallery order
- How to get custom image size for image uploaded in Customizer
- When is is_admin() available?
- Check if current page is wp-admin
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Output 2 items within the Loop
- Set post title based on first h2 element in the content section
- How to get media objects
- How do I let users upload files to a chosen location?
- How to get specific image in media library with php
- hover image appears below placeholder instead of overlayed
- add_image_size for header_image
- Add custom url to featured image
- Get image’s size name from it’s dimension
- Error when adding excerpt to the content through functions.php
- Reprinting tags with all attributes
- Dynamic content based on a URL parameter
- Unread Repeater field IMG alt not working
- Upload multiple images to a Woocomerce product
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Accessing an image folder inside public web directory
- Why is image hard cropping for one image using add_image_size not working?
- Enable custom logo upload if logo is not in header
- Scrape external webpage for first image and add it to new post
- WordPress automatically adds links to uploaded images
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- How can I display a div ONLY if it is not a certain term page
- Add class to DIV depending on page loaded
- Is it possible to display a DIV to not logged in users and then change it for users who are logged in?
- Where are the src and srcset sizes coming from?
- HTML showing after PHP code in tag
- Only show first image in foreach loop
- trying to get wp_get_attachment_url to output clickable link
- Undefined index for default custom theme option
- Remove conditional tag from header
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Images Uploaded saving onto older/previous year folders
- Multidimensional Array
- Add valid XHTML closing img tags to WordPress galleries
- How to set a featured image (thumbnail) with PHP?
- Convert canvas to image and upload image to server
- How to Make Thumbnail of Post Stay Animated
- “if parent category is” conditional?
- Conditional for Post Format
- Woocommerce getting top level category parent and make all sub categories have the same template and menu
- How can I call a specific file (via php) by referencing the logged-in username?
- Convert all uploaded PNG files to PNG-8 format
- CSS images don’t show up with bloginfo
- Some problems in custom widget
- Displaying images outside the content
- Checking page before applying image restrictions while uploading
- Change extension to .jpg when webp is not supported
- Prepend to all image URLs with PHP, only for mobile devices
- Update Images after edit via php
- Configure WordPress to Use Responsive Image Rendering
- Replace background image with post thumbnail in shortcode
- How can i create a function tag in my plugin
- How to get the url of the entry in which an image belongs
- Display specific page if user signed in
- Get list of posts from attachment
- dynamically change content of div with php
- Get the image title and alt from custom query
- How to always display full size image
- Widget Logic – display on page and all child
- Update same content in multiple posts at once?
- Retrieving specific images from Media Library
- How do I routinely extract the thumbnail of the most recent post?
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Create dynamic content from one WP page to multiple other pages
- Pass php to database in JQuery: With AJAX?
- How to define Og Meta Tags in header using conditions [duplicate]
- Overwriting a Shortcode
- images in wordpress themes
- How can I add more code to this?
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- How do I return an image from a script
- Load files content [closed]
- Load slideshow.css file only if Slideshow is checked / on
- Display Post Titles on top of the_post_thumbnail()
- add if statement to the featured image
- Issues trying to add a href statment with PHP into a PHP Echo Statement [closed]
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- if is specific custom post in cpt
- How Create Automatically Image jpg.webp from image .jpg without delete or change original images upload
- Using Featured Image as Hero Background in Word Press
- How can add alt tag in following code. Image are showing dynamic in wordpress