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 change/modify the_post_thumbnail(); html output?
- What’s the best way to use the Featured Image for responsive web design?
- How to add a class to the attachment images
- How to get the url of the entry in which an image belongs
- How to add a PHP scripts into WordPress
- Add code to the header of posts by particular author
- Before & After Content – After Content directly below Before Content when using require_once
- Display specific page if user signed in
- Featured images duplicating and replacing next image
- Get list of posts from attachment
- I can’t load my images from a js file using wp_localize_script
- Trying to modify content.php
- How to create an unordered list of images separate from the content
- dynamically change content of div with php
- Get the image title and alt from custom query
- How to include different html tags in the header for different pages?
- How to always display full size image
- what’s the syntax for if the image exists get the image?
- Show content by using tags
- Widget Logic – display on page and all child
- How do I get the featured post to share on Social Media and show on Individual Post pages?
- Update same content in multiple posts at once?
- Explode Content within specific HTML element
- Retrieving specific images from Media Library
- Need to adjust condition to say if I’m pulling categories from a post, to pull only the first one
- How do I routinely extract the thumbnail of the most recent post?
- How to change this internal image link parameter using PHP?
- add class to background image
- Add end mark at the end of every article
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- 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
- Create dynamic content from one WP page to multiple other pages
- if user is admin display admin link and logout link else display logout only
- Add code only for blog posts
- Pass php to database in JQuery: With AJAX?
- How to resize an image server-side before upload?
- How to define Og Meta Tags in header using conditions [duplicate]
- If Month=Particular month display content [closed]
- Editing the contents of just one div on a page from wordpress
- Creating image gallery in wordpress
- Retrieve first image url from custom post with pagination
- 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
- Snapshot Theme from WooThemes — empty ‘alt’ attribute
- How to echo a different field if another field is empty?
- Changing 2011 theme header image based on user dropdown
- Adding else if conditional statement to purchased theme
- Loading a post’s content, into a div outside the loop, when it’s title is selected in a list
- Setting post thumbnail sizes in template file and functions.php
- images in wordpress themes
- How can I add more code to this?
- Determine if only one image attached to a post/page
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- Crop images in both sides on wordpress [duplicate]
- Conditional in foreach loop is outputting content twice
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- upload images on front by user using form
- How do I return an image from a script
- Encode code snippet in AJAX endpoint
- PHP-Code inside Href-Tag
- Advanced custom fields Repeater conditional statement not working [closed]
- Load files content [closed]
- HTML in PHP problem [closed]
- Adding slides to an existing carousel manually
- Where to store the images of a custom WordPress theme?
- 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]
- An automatic way to crop images of different sizes
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- How to automatically convert images to WebP on WordPress?
- Remove default Image Sizes
- Understanding responsive imagery
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- bloginfo url in javascript
- if is specific custom post in cpt
- Use URL query string in img src attribute
- advanced custom fields: repeater field within conditional statement [closed]
- Add/alter image attribute before render
- 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
- WordPress Block Editor Gutenberg running code inside ! is_admin()
- Adding caption to all images inside an article
- How to make my scroll bar show under condition
- How to create advanced custom fields for backend content
- How to add a shortcode for an image in the following function
- HELP PLEASE PHP slider css
- Side bar only if it’s not a single post or a specific page
- Restricting Image Upload Sizes using ‘wp_handle_upload_prefilter’ – Stuck media progress bar when Featured Image?
- Image alt tag is showing post title instead of Alt Text
- WooCommerce: Custom dropdown for variation selection
- Responsive images, per image type?
- Replace all instances of string in page (including header and footer)