$post
is global variable, so it’s not visible in this scope (and when you use $post
in your code, you’re not referring to global $post
variable but to local one)
You should put global $post
somewhere in your code. For example like this:
...
while ($loop->have_posts()){
global $post;
$loop->the_post();
$output .= '<li><a href="'.get_permalink().'"><img src="'.get_post_meta($post->ID,'wpcf-udstiller-logo',true).'"/></a></li>';
}
...
Related Posts:
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Add validation and error handling when saving custom fields?
- Validating Custom Meta Box Values & Required Fields
- Is there a way to set default custom fields when creating a post?
- Add custom objects/entities to WordPress
- explode array within shortcode
- Change behavior of “Insert into Post” based on attachment metadata
- Adding another state (spam, reject, approve) to wordpress comments?
- Add new “Insert Into Post” button with another function
- Edit Custom Database Tables in WordPress
- Filter results with custom field values and dropdown
- Meta keywords and descriptions plugin for manually editing meta for each page/post
- Making a configurable field translatable
- Call a custom field in an audio shortcode?
- Is there a way to do multiple ordering on a multiple meta_query?
- Check before publishing, if already exist post with current custom field value
- How to customize default wordpress editor?
- Custom Fields Bulk Edit
- Custom Page Template [closed]
- How to make custom comment fields required and message field not required
- wp_editor in add_meta_boxes does not show gallery
- Problem in custom meta boxes
- How to show custom field’s value under post/page title in wp-admin
- Multiplile values checkbox or select in custom meta box
- Adding Properties to User Profile and Displaying in List
- ajax delete value from custom field array
- Custom field for default gallery
- How do I read the value of a custom field of the page?
- Execute/Parse Shortcode in Native WordPress Custom Field Value Field
- how to save multiple custom fields for a post in one go?
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- Best way to add custom / magic / flutter fields into RSS feed
- Insert attachment ID in custom field from media uploader
- How do you create dynamic customised sections in WordPress?
- Delete all custom fields at once?
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- Audio player shortcode not showing up when using variable
- Create WordPress shortcode with php code inside
- Display WP-Types custom fields in post [closed]
- Better Method for Multiple Meta Boxes
- query usermeta from custom field
- custom avatar removal
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- Displaying a checkbox array from advanced custom field
- WP 3.1 meta_query for multiple custom field values
- How to make condition, based on custom fields value?
- How to select posts from multiple categories and metavalues?
- Sort custom field by post
- Shortcode To Display Post Custom Field Value Inside Excerpt
- Send email with custom fields after new draft is saved or new post published
- modify wordpress caption shortcode
- How to create a shortcode to print specific values stored in a post meta array?
- Insert a custom field into a shortcode and use it in post(s)
- How do i add custom fields to my themes template file?
- Custom tables or custom fields?
- Post selector as Custom Field
- I need a “Choose from existing content” popin
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- Custom wysiwyg editor doesn’t execute shortcodes?
- Redirect to another page using contact form 7? [closed]
- Custom Field 101
- shortcode in a custom metabox
- Can data from a Custom Field data be used by a shortcode on a per page/post basis?
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- custom field (video/audio url) and embed functionality
- How to remove custom fields from the selector?
- IF Custom field value equals ZERO
- How can I hide custom field from users used for caching response from external api?
- Display MP3 as media using an URL from a custom field
- Using a custom field inside a shortocde
- How to query an out put value?
- Check & remove special characters in a field?
- Let’s Create Custom Field Template Documentation
- How can I combine this php statement to get the results of multiple variable inputs?
- frontend submit post jQuery clone row won’t save
- Is there a way to set default custom fields when creating a new post?
- MetaBox not saving after empty
- Get text from user and display it on page
- Enable a short code in the custom meta field
- Custom Fields Question
- do_shortcode close
- Showing Custom Fields on Parent Page
- How can I output the custom fields wrapping with HTML
- Custom meta boxes not saving
- Plugin or shortcode for ISBN number?
- How to get all custom fields with some prefix in key?
- Best way to achieve multiple links in a post title
- How to pass custom field value to shortcode?
- WP-eComerce Advance Meta Tag data in descending order [closed]
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Save custom field types with this function…?
- Replacing custom field with shortcode
- Make separate text boxes for separate WordPress Custom Fields
- Custom field bug in WordPress 3.2
- How to sort post listing on a page using custom field value?
- Adding re-type email and check it if the email match
- Odd functions.php issue in WordPress
- Add fields to edit in custom widget
- get_the_ID() retrieves same ID on Gutenberg’s Query Loop