I made this code with help from Google search. And it works fine. I added this code in single.php bottom of the post. Now, I simply add link in every post but image are same. Thanks. 🙂
<?php if( get_post_meta($post->ID, "imglink", true) ): ?>
<p><a href="<?php echo get_post_meta($post->ID, "imglink", true); ?>"><img src="http://-------------.png"></a></p>
<?php endif; ?>
Related Posts:
- Meta Query with AND & OR?
- Problem with serialized arrays in custom meta
- explode array within shortcode
- Can I count the number of users matching a value in a multiple value key?
- Adding another state (spam, reject, approve) to wordpress comments?
- WP doesn’t show Array Custom Fields?
- Filter archive.php by custom meta
- How do I search an array stored in a custom-field using WP_Query?
- Custom text-only header
- How to delete custom field “suggestions” from dropdown list
- How to save custom fields for attachments
- How to get a meta value from all post
- Adding existing user custom field value to a woocommerce product [closed]
- How to save values of a custom input field on the Network > Site Info screen
- How to load php file for specific page in admin?
- How to set default metaboxes on user creation?
- Exclude custom post type from search by custom field value?
- ajax jquery update custom field meta value front end
- Add input field to ‘Pages > Edit Page’ through functions.php
- Adding Custom Text Area to WooCommerce Product
- get_post_meta not working inside loop
- Get multiple custom field values in a $wpdb query [duplicate]
- add meta box using function.php
- Custom image sizes for custom field media uploads
- converting custom field date format
- How do I exclude posts by custom field value?
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Auto populate a meta box field from another meta box field when publish or save
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- Add Paypal Button programmatically
- How do I use wp_query for WordPress search?
- Nav Menu – Add class based on meta keys
- Eliminating the appearance of a specific custom field in a post
- Conditional custom field query
- Display two custom values from a post
- Find page IDs with specific meta tag key value pairs
- Order query by meta_value with multiple custom fields
- Conditionally hide or show woocommerce product variation in fontend by custom field
- custom meta box text field: how to limit to alpha or numeric only
- Accessing loop functions (e.g the_title or the_content) from post ID
- Create an Array of Specific Custom Post Meta
- custom avatar removal
- Excluding Specific Fields from Profile Builder Registration Form
- Send email with custom fields after new draft is saved or new post published
- How to add upload video option in wordpress for user?
- Get posts with same meta value as current post
- Add custom field to all posts in specific post_type
- Set post to unpublished after one week depending on condition
- URL Rewrite fires when retrieving a custom value?
- query posts custom field calculation value
- Get Data From wp_sitemeta for Multisite network
- Efficiently sort only certain categories by custom field
- How can I do a variable for meta_query?
- Syntax Issue: How Do I Call A Custom Field Inside a ForEach Statement? [closed]
- How to list Category list in ACF Pro’s Select Field to choose from [closed]
- Singleton Custom Field (Meta Box)
- Display custom field & value correctly on page
- Displaying custom filed content instead of post content
- Copy price categories to custom field
- Save all the post tags inside a custom field
- How to add fields in custom registration form, validate it and aave to db? [closed]
- Use Advanced Custom Fields – replace line of code that hardcodes the tag into the template
- How to update a custom field in all posts with the value of another custom field in the same post?
- Advanced Custom Fields and Post Meta Fields Relation
- Set featured image from custom field URL
- Best Way to get facebook share count and update using wp_schedule_event or any other method
- Get YouTube video id from url in a custom field
- Filter posts by custom field (Advanced Custom Fields)
- How to insert multiple checkbox values into post as custom fields from frontend
- KEY and VALUE custom field issue
- Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
- Fallback for empty custom fields
- WP E-Commerce Custom Meta > Serialized array
- Problem with writting correctly a query posts args in WordPress
- Add a field to just ONE page
- get_post_custom_values problem, please help
- Display Additional Info
- How do I upload file through custom field, save it to database and get it
- How To Save Data From Remote APIs To ACF?
- Custom meta fields and meta keys
- HTML for adding a meta box (basic text field) to page editor?
- Add link to wordpress field data
- Adding text box with add_meta_box
- Save Taxonomy of Post via custom Taxonomy Select Dropdown
- use custom field value as featured image
- adding autosave feature to custom fields
- (woocommerce) How to get product id form order id & then retrieve custom meta linked to product?
- How to delete WooCommerce Products than have a specific custom field?
- Is it possible to manage Multiple Custom Fields with Some Relations
- Check for meta data before it is published
- Custom Metabox Always shows box and checked
- Create custom query for search?
- Display Data From This Custom Media Upload Meta Box?
- Display Child Page with custom fields within Parent Page
- Convert all dates in field to Unix time, except those already in Unix time
- get_post_custom_values not working
- Pagination not displaying correct number of pages
- Show div based on custom meta value
- Assign class to Drop Down Selections in WooCommerce Products Custom Fields
- Show/Hide Featured Image or replace it with custom field [closed]