$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 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
- Filter results with custom field values and dropdown
- 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?
- Custom Fields Bulk Edit
- Custom Page Template [closed]
- wp_editor in add_meta_boxes does not show gallery
- How to show custom field’s value under post/page title in wp-admin
- 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
- 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?
- 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?
- 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)
- 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?
- custom field (video/audio url) and embed functionality
- 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
- frontend submit post jQuery clone row won’t save
- Is there a way to set default custom fields when creating a new post?
- Get text from user and display it on page
- Custom Fields Question
- do_shortcode close
- 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?
- 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
- Adding re-type email and check it if the email match
- Counting post fields
- Approach to creating a site with this structure
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- how can i show WordPress custom field data to my short code?
- Search fails when using the radio buttons
- How To Show Shortcodes In WordPress Custom Fields?
- Output Custom Field value to shortcode
- Save input form on custom field
- Stop truncation of shortcodes in custom text fields?
- Using ACF Custom Field value in a URL with do_shortcode() [closed]
- When post is updated, custom metadata in text area field is overwritten
- Extend WP_Customize_Control with Multiple Field Control
- custom field functionality
- How to add an option to admin to add image that could be used as header?
- Running a Gallery Shortcode in a Custom Fields Widget
- Show or hide lang=”ur” in main element
- How can I create more “create attachment” custom field – any idea?
- Adding thumbnails for non-image attachments
- Insert wp gallery shortcode into custom textarea
- Displaying shortcode content inside custom field without images
- Parse Shortcodes in Theme’s Custom Field?
- I would like to display different text on different pages
- Add image custom attribute [closed]
- Check if a field is capitalized?
- Retrieving custom field as shortcode
- Shortcode not picking up custom field
- Problem display
- Add fields to edit in custom widget