Issue with file paths after porting metabox from main theme to child theme

I found the answer my self, the issue had to do with a line requesting the content of the metabox (as expected). The line: ‘template’ => get_template_directory() . ‘/lib/metaboxes/custom_textbox.php’, should have been changed to: ‘template’ => get_stylesheet_directory() . ‘/lib/metaboxes/custom_textbox.php’, According (to the WordPress Codex) will get the path for the main theme. If you want … Read more

WordPress adding extra html coding to my data on saving

IT turned out to be less hassle to just recreate my plugin using the latest and greatest code available here: https://github.com/helgatheviking/WP-Alchemy-Holy-Grail-Theme And it also turned out to have something to do with the filter being applied to the editor. This: <?php echo esc_html( wp_richedit_pre($mb->get_the_value()) ); ?> was the problem, replacing it ultimately with this solved … Read more

WPAlchemy – Checkboxes not saving

After more searching I decided to try one of the alternative methods listed in the checkbox-meta.php example file. I used a “foreach” loop instead of the “while” loop and the checkbox state is now loading properly. Here’s the updated code: <?php foreach ($items as $i => $item): ?> <?php $mb->the_field(‘t_enabled_widgets’, WPALCHEMY_FIELD_HINT_CHECKBOX_MULTI); ?> <input type=”checkbox” name=”<?php … Read more