Have you looked into the shortcode API? It has some very powerful tools to add as many array items as you’d like, and put the shortcode anywhere on your site.
Here is a small demo of what you could do:
function create_shortcode( $atts, $content = null ) {
$a = shortcode_atts( array(
'sauna' => 'attribute1',
'parking' => 'attribute 2 default',
'natural' => 'attribute 2 default',
'food' => 'attribute 2 default'
), $atts );
foreach ( $a as $key => $value ) {
echo '<input type="checkbox" value="' . esc_attr($key) . '"' . $key. '>' . $value . "<br>";
}
}
add_shortcode( 'japan', 'create_shortcode');
Now to utilize this shortcode just enter this text [japan class="headline"]asdf[/japan]
and it will produce a column of checkboxes. Not pretty but should get you in the right direction.
Related Posts:
- Using meta query (‘meta_query’) with a search query (‘s’)
- Including custom fields in search?
- Add custom fields to search
- Custom search: by post data and post metadata?
- Need small coding with Custom Fields Search
- Search ONLY by meta key / meta values
- Filter results with custom field values and dropdown
- Add custom field (value) to search result (without plugin)
- Is there a way to do multiple ordering on a multiple meta_query?
- searching in custom meta field
- WordPress Search Custom Meta Field Only
- Exclude custom post type from search by custom field value?
- Extend ‘The Events Calendar’ search to include custom fields [closed]
- Include woocommerce custom field value in front-end search result
- Including Database Generated Pages in Site Search [closed]
- Adding Custom Fields to Search
- sort search results by custom fields using dropdown
- How do I use wp_query for WordPress search?
- Custom Fields Not in Search Results
- How make a custom search on backend in WordPress without plugin?
- filtering custom post types via meta data drop down
- Advanced search by two criteria – sort by location and date (ascending or descending)
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Advanced search for meta fields
- Merge Multiple Custom Fields into one New Custom Field for Searching
- How to populate custom field dropdown box based on prior selection?
- Search in Archive Pages by subcategory, tag, custom field and year
- Custom WP_Query for WordPress Search Results with meta_query
- filter custom field values $min $max
- Restrict WordPress Search to Custom Field
- How can you include custom post meta in search without calling each key?
- Include one custom field in search results
- Custom search SQL Query to add custom field in result
- Search Results Page – Displaying Custom Meta Fields
- Custom field Search with Relavanssi
- How to exclude custom fields from search queries?
- How to show content of custom fields in search results?
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- Type character in name and make it invisble
- Search & column order by meta value in admin
- ACF multi taxonomy on filterable gallery
- search based on custom field
- Very large list of options for BuddyPress profile fields
- searching by keywords in post’s metas or pagination links problem
- Search fails when using the radio buttons
- Admin – Search Events by a custom field
- Search one custom field?
- Create custom query for search?
- Query postmeta values, and return multiple post_titles for common meta value
- Query Custom Fields in Searchform
- Help sorting by Meta Key value
- Custom search with meta fields
- How to display search query as formatted text?
- Search for meta_query does not return any result if combined with title
- 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?
- WP doesn’t show Array Custom Fields?
- 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
- get_post_meta not working inside loop
- How do I exclude posts by custom field value?
- Orderby custom field meta value ASC and then by date DESC
- query usermeta from custom field
- Creating author profiles with extra fields and exporting that data?
- Removing link ” from ” on meta_value in custom feilds
- Jetpack post types Portfolio or Testimonials support for custom fields?
- How to add a custom field in the advanced menu properties?
- Meta query with multiple custom fields for archives page ordering problem
- How to let users choose where to search for posts?
- Custom Fields – How to create a list from multi-line entries of a single value
- custom field (video/audio url) and embed functionality
- Querying posts by latitude and longitude to build a Google Maps with several markers
- How to display childrens custom fields?
- How to use pre_get_posts to alter posts_per_page of category pages, where ‘posts_per_page’ will be dynamic
- Displaying pages with a specific custom meta
- How to update user profile custom fields
- How to validation for sanitize_URL?
- How can I output the custom fields wrapping with HTML
- How to get custom image field of specific post id
- wp_get_attachment_image_src() with advanced custom fields returning empty
- How to update custom field of a posts in a particular category
- Change word in woocommerce product category custom field
- Woocommerce products search with custom fields
- Convert author metadata to a custom field
- Custom pages or Custom Posts
- get_avatar filter is not working as per requirement
- WordPress Admin – Automatically Sort Custom Posts by Custom Field Date Value in d-m-Y Fomat
- how to execute custom field for structured data?
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Retrieve Google API JSON data and store as WordPress Custom Fields
- meta_query ‘compare’ => ‘!=’ not working
- Show comon custom field results?
- Display Data From This Custom Media Upload Meta Box?
- Display Child Page with custom fields within Parent Page
- Pagination not displaying correct number of pages
- Show/Hide Featured Image or replace it with custom field [closed]