The problem seems on the line no 279 of metabox class api definition, below is your code:
'<img src="'.$label.'" class="optionimg '.$selected_value.'" onclick="document.getElementById(\
''.$field['id'].$choices.'\').checked=true" style="display:inline-block;" /><input type="radio"
name="%s" id="%s" value="%s" style="display:none;"/>',
$choices
is not defined variable in the scope (error thrown by WAMP), I think you should replace $field['id'].$choices
with $value
as in below code:
'<img src="'.$label.'" class="optionimg '.$selected_value.'" onclick="document.getElementById(\
''.$value.'\').checked=true" style="display:inline-block;" /><input type="radio"
name="%s" id="%s" value="%s" style="display:none;"/>',
Hope it helps.
Related Posts:
- How to call a PHP function from Javascript in WordPress
- WordPress Infinite Scroll without using any plugin
- How to preserve PHP modifications while upgrading WordPress?
- How to remove a metabox from menu editor page?
- Why is my custom meta box input not saving
- Calling a method from functions.php on a click of a button
- How to use WordPress (PHP) functions in AngularJS partials files?
- Understanding WordPress child theme custom JS loading
- Click loads template via ajax
- javaScript in section of WP API
- How to speed up admin-ajax.php in wordpress
- Adding tawk.to code just before body tag on functions.php file
- How do I fetch all comments per post via WP REST API?
- Slide in Panel WordPress Post
- How do I display a user’s previous orders as a select box option on a product?
- Trigger popup in a php if/else statement
- Use menu link or onClick to set a variable
- How to select the contents in the text view textrea in wp_editor?
- Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?
- Image media upload metabox
- Linking text within textarea of custom meta box
- Populate dropdown with Child Pages based on Parent Page chosen
- remove wp floating submenu in wp dashboard
- How to complete two other input fields, completed the first
- JS file work only in index page
- Need Help Fixing My Iframes [closed]
- dynamic dependent select dropdown
- Ajax load more button for comments wordpress
- Trying to retrieve post meta
- Noscript not working as it should in wordpress site
- Show meta box only for default page template
- Illegal string offset in PHP function
- Tell WP register script to load a script only when the entire page is loaded
- Why does this update_post_meta function not delete the custom field itself?
- Why i can’t get custom fields value or post ID via Ajax?
- How to reference PHP in Javascript
- Warning: call_user_func() expects parameter 1 to be a valid callback, function
- Unable to Call More than One Meta Box Output
- Time Delay a URL Redirect for Specific Page
- WordPress User Meta value variable into Google Gauge Chart
- Add a Metabox checkbox to the Page Edit screen of wp-admin , which only certain roles can see and Makes only certain roles able to Edit said page
- Checkbox doesn’t save inside metabox
- Dropdown category field inside repeatable metabox
- Create shortcode for metabox gallery
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- Adding HTML Code to Replace Text in PHP
- Display metabox galleries on specific page template in admin editor
- Gutenberg block don’t save rich text content
- Trying to add some custom text into WordPress Post title via function.php
- Update $wpdb query with AJAX
- Using Javascript On Page – Header and Footer Now Missing
- Adding extra data to shortcode attributes and pass it to JS with wp_localize_script
- How do I make comment-reply-button with that takes to comment reply form on click
- custom post type column countdown
- How to call a function from functions.php with ajax?
- Custom Post type Ajax search results
- WordPress load javascript file if something… (after the page is loaded)
- Automatically refresh page if widget is added to page?
- wordpress all post filter by year
- Find the method which AJAX GET calls
- Display text of price (minus 20%) on every product page in a sentence.
- Custom meta box save values issues – Deprecated: Function ereg() and more
- Display a post based on its metabox selection
- Metabox Input Not saving
- Display custom meta box in my template file
- Trouble figuring out how to get my button to submit comment
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- How to hide .js files on wordpress website using php or wp plugins or any? [closed]
- Warning: Illegal string offset ‘post’ and ‘page’
- How to get meta box labels?
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- hiddenQuestions.find is not a function
- Calling a function via a shortcode in javascript
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- Custom PHP contact form issue
- Using PHP to toggle stylesheet and header image, set in cookie
- Archive dropdown styling not applied
- using woocommerce_template_single_add_to_cart in shop-loop – javascript issues [closed]
- Uncaught TypeError: Cannot read property ‘firstChild’ of null after upgrading to WordPress 5.5
- WordPress if (is_page) translation on certain page
- How to add SVG icon above product tab title
- Change links automatically to affiliate links
- Can I change a variable in a content part while calling it?
- Display notification only once
- Replace comment avatars and links at the same time
- How to make thumbnail image fit into a div where image dimentions are completely different?
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Use WordPress’s Media Uploader/ Manager in non WordPress php application
- Check if Product is in a Specific Category in Functions.php
- Get/Set wp.customize.previewer.previewUrl
- Change logo based on incoming domain
- Recent post display using shortcode
- Insert all post IDs in new database table
- Generating add_settings_section() calls dynamically
- page template for attachement page?
- Use is_product_category() properly
- Check if term object is in array
- enqueue multiple Google fonts with multiple weights and styles (italic)
- Highlight Current Tag in wp_tag_cloud