I asked the question in another group and here I got an answer that has turned out to be useful.
BE AWARE! It must be dealt with with caution as the PHP eval() function can be a significant security risk.
Find the answer here:
https://stackoverflow.com/a/55518496/11309498
Related Posts:
- Search that will look in custom field, post title and post content
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- WP insert post PHP function dynamically generated Custom Fields
- Conditional to modify query results
- Create a random unique 6 digit number as custom field for custom post type
- Using several custom fields as custom post title
- Replace text in post from cvs
- Query & Order posts by custom fields
- get_post_meta not working on publishing
- Displaying custom field according to date
- Add additional field to custom post_type
- finding and using post type fields in WordPress
- Get data from PHP to JavaScript to set position of each post on front page
- How do I show my containing my custom field ONLY if there is a set value on that custom field? [closed]
- CPT Repeatable Fields + Undefined Index
- Let users upload image(s) to the post from front end
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- How can I sort the order of multiple custom field values in a custom post type?
- How do I ensure that post_type and Taxonomy use the same slug?
- Create an user checklist system for a course plateform using ACF Pro and ACF Extended
- Custom fields array to display it monthly
- Alike Shortcode using in Custom Shortcode
- Query custom post type that has a serialized relational advanced custom field value
- Sort custom post column by generated value?
- when looping through custom post data not appearing
- PHP Notice: Unidentified index
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Can’t pick up a field created with Advanced Custom Fields
- Get month and day from a Date Picker custom field
- Function not pulling image or text from custom post type
- Show Custom Post Type taxonomy term that matches custom field
- Order by custom field attribute
- Select Menu for Custom post Type does not save
- How do I filter a custom post type loop by a field?
- Get custom post fields and display them
- Send email on creation of custom post type and use get_post_meta()
- Custom Post Type Data in Sidebar widgets?
- WordPress Custom Post Types with a page as a parent?
- Hide custom post type field from author?
- Many to Many Relationship between Two Custom Post Types
- wordpress plugin error handling
- Creating Photo Gallery System with Custom Post Type
- Set post title from two meta fields
- Trying to save custom post type from frontend partially working
- Custom Taxonomy order by Custom Field
- Show ACF field from custom taxonomy and display on the single template
- Custom Post Type Navigation on Custom Field
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- how to interconnect custom post types?
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- WP All Import – Using Xpath to set a select value
- Filter custom posts using auto populated dropdown selectors
- Two Custom Post Types Many to Many Relationship
- Dynamic dropdown select values depending on other custom field value
- Grouping metadatas into one
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- How to Output which matched meta_keys were found from custom_type_posts?
- Query based on custom fields start and end date
- DIsplaying URL of custom field in last post of certain taxonomy && post type
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Different options per post type in WP_Query
- How do I create a new post upon registration with the users first and last name as title
- How do I replace the post title with a custom field?
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- Custom Post type loop with ACF not displaying properly
- How to display wp_post by custom field value?
- Using Wp_Query, Json to add Highcharts series data
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Custom post types category
- Using page title as a link to term archive
- Custom Taxonomy dont save in a frontend form for post a custom post
- Update custom field value
- Should i use custom post type for a custom footer?
- Setup page template array in a custom post type
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Custom taxonomy terms as children of multiple custom post types
- How to access repeater field of a custom field?
- PHP Warning with Custom Fields
- Do not show child pages within a file page
- Custom post types & Pages hierarchy – Error 404
- filter rest api post by a acf filed
- How to prepend text to custom field value A, but only if custom field value B matches a certain string?
- Custom post type that lets users create a set of posts?
- Delete custom post type metadata without deleting the post in admin area
- Creating multiple CPT posts from one Gravity form
- Order Custom Posts by Several Fields
- Repeatable custom meta select boxes
- Looping taxonomy in taxonomy?
- Types plugin isn’t compatible with my custom post type
- Show Posts in Vertical Tabs with Scrollbar
- Custom Post type as Taxonomy
- How to manage wordpress knowledge base/wiki/posts collections
- Display div based on Group metabox selection [closed]
- Getting ACF relationship field information
- Post object GUID adding http:/
- Query order by a numeric ACF field