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?
- How do I hook into WordPress to save an uploaded photo as an alternate size to an existing photo?
- How to check if image is already stored in a site’s post database? (network)
- Adding a custom image upload size and making it selected by default?
- How to draw media details for Isotope gallery using Photoswipe
- Create Image Uploader for Widget
- Permanently remove first image from posts
- Debugging upload problem: What part of WP does actual image-resizing?
- How to resize image on client-side before upload?
- How do I get images (with a thumbnail preview) to show in search results?
- How to get custom image size for image uploaded in Customizer
- Using wp_get_image_editor in a standalone script
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Using is_page() in functions.php not working at all
- Styling images coming from another blog
- How to scale image with equal width and height without distortion?
- How to enqueue CSS and JS only on specific template?
- IMG src weird behaviour inside a single post loop
- Escape post image attachments added to template
- Display post image with fancybox
- PHP code to call image Caption, Alternative Text, and Decription?
- Echo URL of large version of Featured Image
- Change the URL of an image from wp_get_attachment_image_src except in the frontpage
- Best practice for migration friendly images in posts/pages?
- how could I load a different template part by page
- Error when adding excerpt to the content through functions.php
- Get the post ID and display the images
- Responsive Header for Phone
- Unread Repeater field IMG alt not working
- Why my image upload button is not working in wordpress widget area?
- How to make own crop image function for WordPress plugin
- If tag equals then show else show
- WordPress automatically adds links to uploaded images
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- If ‘editor’ is empty, then
- Add class to DIV depending on page loaded
- Timthumb.php image gallery not working on Multisite WordPress
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- Where are the src and srcset sizes coming from?
- HTML showing after PHP code in tag
- trying to get wp_get_attachment_url to output clickable link
- Change default gallery images – Currently they are displaying full size imagese
- Remove conditional tag from header
- Creating black and white copy of an image [closed]
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Images Uploaded saving onto older/previous year folders
- Multidimensional Array
- How to set a featured image (thumbnail) with PHP?
- Image rotation issue (horizontal picture uploading as vertical) — Exif issue?
- How to Make Thumbnail of Post Stay Animated
- 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?
- Adding a ‘style=’ bit to image_send_to_editor output
- CSS images don’t show up with bloginfo
- search and add in wordpress content
- Some problems in custom widget
- Displaying images outside the content
- Checking page before applying image restrictions while uploading
- Generate images with html2canvas and the woocommerce api
- Change extension to .jpg when webp is not supported
- Prepend to all image URLs with PHP, only for mobile devices
- Retrieve alt text by referencing the img src
- Show next image in array if page is revisited by same logged user
- Update Images after edit via php
- How to add Text before my Custom Term and hide it when empty
- How to get the url of the entry in which an image belongs
- Display specific page if user signed in
- dynamically change content of div with php
- How to include different html tags in the header for different pages?
- How to always display full size image
- Widget Logic – display on page and all child
- How do I routinely extract the thumbnail of the most recent post?
- add class to background image
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Save the outputted image into the Media Library, with a different filename and extension
- if user is admin display admin link and logout link else display logout only
- Add code only for blog posts
- How to define Og Meta Tags in header using conditions [duplicate]
- If Month=Particular month display content [closed]
- Creating image gallery in wordpress
- Image limit from 1 to 5
- Overwriting a Shortcode
- Name Input from widget displays Sidebar name instead of saved data
- Gallery requires a featured image but does not show it in posts/pages
- Changing 2011 theme header image based on user dropdown
- images in wordpress themes
- 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
- Encode code snippet in AJAX endpoint
- Load slideshow.css file only if Slideshow is checked / on
- add if statement to the featured image
- Issues trying to add a href statment with PHP into a PHP Echo Statement [closed]
- How to automatically convert images to WebP on WordPress?
- 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
- How to make my scroll bar show under condition
- HELP PLEASE PHP slider css