New answers tagged

1

The meta_value field is longtext, which a quick google reports is 4,294,967,295 characters - I doubt you're exceeding that. Chances are it's an issue with PHP, specifically post_max_size - if this is less than the "huge amount of data" you are referring to, PHP will simply truncate $_POST and you end up with nothing.


1

It's nothing to do with the class itself - you are using the reserved input name post, which is conflicting with WordPress core: <input type="checkbox" name="post[]" value="%s" /> Change it something unique to your theme/plugin e.g. name="my_plugin_ids[]"


0

function your_function() { global $current_user; if($current_user->roles[0] == 'administrator') { add_meta_box(your parameters); // fill in your parameters } } add_action('admin_init','your_function');


0

I just found the solution. use this code instead public function register_voguepay_woocommerce_payouts_dashboard_widget(){ add_meta_box( 'withdraw_to_bank', 'Withdraw to Bank', array($this, 'voguepay_woocommerce_payouts_dashboard_widget_display'), 'dashboard', 'side', 'high' ); } public function ...


0

Here what I did & finally problem is solved. To make the code work just use get_term_meta and add true to be like this: $res .= get_term_meta($t_id,'publication_date',true); I hope this will help any one facing such issue. Also, those who use prefix need to add it before the field name as mentioned by P-S


1

Possible solutions: Check if there's a prefix which you setup for the custom field (https://en.bainternet.info/tax-meta-class-faq/#comment-1107) Go to the Tax-meta-class/Tax-meta-class.php file and find the function you're calling and debug the issue: // Tax-meta-class.php public function get_tax_meta($term_id,$key,$multi = false){ $t_id = ...


0

I think for this you want to go with Wordpress Setting API. If you prefer meta box. You have to add a do_action in your function which render the page (view_tasks_submenu_page_callback). do_action( 'add_meta_boxes', $hook_id ); And add do_meta_boxes($hook_id, $context, null) where you want your meta boxes appear. replace $hook_id by the fourth parameter ...


0

This is the totally wrong approach to the problem (and this is really a UX question, not a coding one). When you have many submit buttons, the UX convention is that each button will submit data grouped with it and not any other. This is not how wordpress post editor work as it has only one form and the metaboxes are just for visual effect, not a true ...


1

You can use the action pre_get_posts . Just make sure to check is_post_type_archive('question') and is_admin() to prevent affect queries in the whole website.


0

I have worked on your issue and found a solution after some Google. Note: Add the below mentioned code to theme's functions.php or any plugin's file. Code: This filter function will add a custom tab to the Products Data metabox <?php add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' , 99 , 1 ); function ...


0

It's a little too much code to put here but here's how you do it. There are a lot of good tutorials (and plugins) on that site. This is the best example I've seen for managing the quick edit screen. Since the quick edit screen is related to the columns displayed you may need to manually control the columns in the screen as well. To do that use the ...



Top 50 recent answers are included