if( in_array( 'comments',$meta_info ) ){
$key="link";
echo '<span class="post-meta-info with-cmt">' . apply_filters('yt_icon_comment', '<i class="fa fa-comments"></i>') . ' ';
comments_popup_link( __( '0 Comments', 'theme' ), __( '1 Comment', 'theme' ), __( '% Comments', 'theme' ));
echo '</span>';
echo ' <a href="'. get_post_meta($post->ID, $key, true) .'" target="_blank">Images Source</a>' . "\n";
}
Try this code once. I modified the code with your supplied content.
Related Posts:
- What’s the difference between WordPress random_int() and PHP built-in function random_int()?
- Is it ok to use a function to output the text domain name in a wordpress theme
- Issue with wp_get_attachment_image() and SVG file type
- How to override a function when isn’t at functions.php
- deregister scripts on certain page
- contactform7 remove tags with “wpcf7_autop false” from functions.php
- How to count number of functions attached to an action hook?
- Show modified time if post is actually modified
- ajax live search for post title
- How to get an array of menu items from the toolbar?
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Using get_terms for custom taxonomy in functions.php
- Fatal error: Call to undefined function add_action() – an untouched problem
- Hide some items from Screen options in dashboard for products
- Editing or filtering the output of the Genesis navigation
- Automatically Add Specified Value to Attachment Metadata upon Upload
- Twenty Eleven Child theme error when attempting to use a rewritten function
- edit role display name and label name without plugins
- is_plugin_active() not properly returning true
- Display gallery on top before content
- List of Body Classes Generated by body_class()
- Converting html to wordpress images not showing
- is_dynamic_sidebar always returns true while using Jetpack visibility
- Redirect specific page in WordPress for first time visit
- How can I add text to all posts/pages/categories/homepage etc
- Related post using post title
- qTranslate in functions.php
- Using Schema with `the_excerpt`
- Image rotation fails to regenerate custom sized thumbnail
- Move Post to different category if post_meta field is 0 or is 2 days old?
- Display alert on successful user Sign Up
- Getting different functions data while using while loop in wordpress
- How to rewrite the custom url in wordpress?
- Set spesific size of featured images
- Excerpts are not displayed by a shortcode on category pages
- Getting comment count per post not working
- Functions.php Problem
- It does not work concatenation in function.php
- How would I go about replacing this function in my child theme located in inc/template-tags.php
- Condition OR for current user ID
- Retrieve a value from Yoast SEO to use to set a default twitter card image honoring overrides
- Get arguments from URL
- If user is logged-in display/hide something
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- Adding javascript to functions.php causes problems with my template
- Where do I store custom functions that call custom page template files?
- Excerpt for pages not showing
- Can’t Write Custom Widget Code In One ECHO
- Got white blank page after copying the functions.php to child theme
- Access category within rss2_head hook?
- How to Extend login session times to a Month
- Insert nofollow in a “Powered By” link, except in the homepage [closed]
- Woocommerce image sizes missing from Appearance › Customize but not declared by theme
- Prevent WordPress Automatic Logout
- Image loading function not working on archive.php template
- How to add array [closed]
- what is best way to keep track of changes made in wordpress website? [closed]
- How add body_class from wp_termmeta
- remove_action not working, even after changing priority [duplicate]
- Is this an acceptable practice for WordPress theme development?
- Modify function to only return values for the user that’s logged in
- WordPress performance – send all metaboxes to function or to call it again
- Add a class to post if it has been recently updated
- Change custom featured image size in twentythirteen child theme
- Theme Customizer – Custom Sections Display, but do Nothing
- how to add_filter to non hook function
- WordPress comment processing . Default unapproved comments detection before posting
- Display a list of random terms from custom taxonomy with shortcode
- Members only function, but allow account activation [solved]
- wp enqueue style on about us page
- CF7 select value get to function and reciept value from function
- Remove nofollow from internal comment links via functions.php
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- How can I automatically delete comments that contain a URL?
- Run function for specific user only
- Appending „read more” to the excerpt conditionally
- Remove action hook from Class, understanding OOP
- Why is the term of my current page not returning a slug?
- Create custom admin bar menu items
- Adding a class to the body of an inactive site using multisite
- Conditionally apply css for a specific template part
- Serving cache from multiple domain names
- Fatal error: Call to undefined function. Underscore me
- Why am I losing image quality on my site?
- Replace image attributes for lazyload plugin on image elements with specific class
- Setting Active Nav item (of Pages) when you are on a Post with Category
- How to disable site title and description when custom header is uploaded on the customizer?
- How to run a function when publish posts? [duplicate]
- What is wrong with functions.php? Fills error log with same error
- Function returning queried meta value based on current post ID
- Adding custom field in menu options [duplicate]
- Increase Comment Author Gravatar Size On WordPress Default Comment Function
- Random text changing to weird icons in both admin & front end
- update_usermeta don’t work
- Pull random comment from specific post, display on homepage with shortcode
- Hiding Google Analytics code based on theme options
- How do I make my child theme’s CSS update when I save it?
- Bulk set Post Title as Tag where Tag is Empty Function
- Get all users from role and add to dropdown (select) – wordpress, javascript
- WordPress enque the same script causes the setInterval not to work