All you need to do use apply_filters
.
foreach ($video as $vid) {
echo '<li>'.apply_filters('the_content',$vid).'</li>';
}
It may be more efficient to concatenate a string and then run the filter on the whole thing.
$lis="";
foreach ($video as $vid) {
$lis .= '<li>'.$vid.'</li>';
}
echo apply_filters('the_content',$lis);
I haven’t benchmarked the one versus the other but given that the latter calls the filter once and the former many times, I’d bet on the latter.
Related Posts:
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- Is there any action filter/hook for validating a custom field before publishing the post?
- Filter WP_Query for posts having a certain meta-value
- Pass all custom fields through the same filter on post load?
- Filter results with custom field values and dropdown
- Archive sorting functions by custom fields (front-end)
- How to oEmbed from custom field, responsive to container size and responsive
- Change content before writing to database
- WordPress Search Custom Meta Field Only
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Using custom fields in a filter hook
- Add an advert every nth Paragraph
- How to filter a dd/mm/yyyy date from a custom field in a query
- Force hide custom field metaboxes
- Saving custom profile fields
- Update posts after populating ACF field value [closed]
- How to validate custom field on lost password form before the user id field?
- filtering custom post types via meta data drop down
- global function to apply filter to custom field
- How to order posts by one custom field and filter them by another one?
- Filter multiple custom fields Values with Check boxes
- How to get categories with posts by custom field value?
- How to Wrote Simple Calculations by Using Custom Fields in Loop?
- Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)
- Best filter to use for modifying custom fields on a post?
- How to display childrens custom fields?
- Access ACF fields within custom preview function?
- Sort posts by clicks on download button
- Let Users Filter Posts by Custom Fields
- Custom Theme Fields in Settings Menu – apply filters to one of those fields?
- Footnotes in custom fields
- How to change permalink on headlines in rss feeds?
- How to change order of posts in admin
- How to query posts by month based on date custom field?
- Filter or order based on custom field
- How to show ACF fields in Gridbuilder custom block
- WP meta_query args not working in function
- User Filter Options on Archive Page
- How to add content with a filter when there’s no content in the editor
- change attachment custom field onChange event
- Filter and display a specific custom field value [closed]
- How to filter post using custom feild value in shortest and longest duration?
- Query Posts Via WordPress URL
- Create widget that filters posts on current page based on entered value
- Including inline Custom Fields info with add_filter in functions.php
- Sort posts after filtering them through multiple taxonomies
- Set new url from custom post field
- Underscores in custom fields
- Add custom fields when specific templates are selected
- Save custom user meta on registration
- Using media-upload.php to upload mp3 via custom fields
- Detecting Embed URLs Within post_content
- Meta keywords and descriptions plugin for manually editing meta for each page/post
- How to add/save Custom Field in user settings/profile “Checkbox list”
- Display info from custom fields in all images’ HTML
- How to use query_posts() with a date filter on a custom field?
- Login & Register & Custom details WITHOUT plugin
- Deleted pages showing up when querying for child pages
- Ordering posts by date custom field
- Sorting WordPress Posts via Custom Field Values?
- Auto Populate Custom Field with Complex Value That Increase by One?
- Display custom field if it exists and has a specific value [closed]
- WordPress: custom field display twice
- meta_compare seems to be treating values as strings instead of integers as expected
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- How to add fetchpriority parameter to images in the media library?
- Editable custom field in WP Admin Dashboard
- Customizing user data
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Show user info in a hovercard [closed]
- edit_tag_form_fields is depricated but tag_edit_form_fields doesn’t work
- Iterate through users and display users meta info at front-page
- Getting the Featured image URL and inserting it as Custom Field on Post update / publish
- Adding custom field and querying from post table
- How to display a product features dynamically with icons?
- Update custom field values on edit address page woocommerce
- Is there a (sane) way to get all custom fields for a post, which do not have a leading underscore?
- Custom field image to Featured Image
- Show array of meta_value in Edit Post Coloum
- custom filed from post in the side bar
- Working with multiple values and metaboxes
- Unable to select image with custom field
- Rewrite comment form post ID on submit
- Move the metaboxes to the very top of post editor
- WordPress Rest API custom field not updating till i manually update the post
- search based on custom field
- Why isn’t update_post_meta saving?
- Custom fields multiple commas separated values
- Add custom field information to source meta data
- How to save array option as text and not integer?
- Make a custom field in admin post.php read only
- Delete custom meta
- Custom fields are not displaying in page with multiple loops
- Add class from custom field into widget class
- Get multiple posts with some custom fields efficient
- Adding custom field to Lightbox in header only pulls current page data, not Lightbox item data
- Meta boxes not displayed, data isn’t being saved
- Custom fields / meta box output
- Get single image from custom fields made with WCK custom fields creator
- How to add google map to custom field