My meta box don’t want to save value
My code works perfectly. The second parameter of the value is a string $value = get_post_meta($post->ID, ‘_product_price_value_key’, true);
My code works perfectly. The second parameter of the value is a string $value = get_post_meta($post->ID, ‘_product_price_value_key’, true);
$urlbox = get_url_desc_box(); if ( !empty( $urlbox[0] ) ) { echo sprintf( ‘<a target=”_blank” href=”https://wordpress.stackexchange.com/questions/66338/%s”>Visit Website »</a>’, $urlbox[0] ); }
I failed to mention that I’m using the Essential Grid plugin to make the grid elements. This plugin has the ability to use meta data from your theme or another plugin in the grid. Therefore, I’m creating a grid that’s linked to a Custom Post Type, then I’m using meta from a custom meta box … Read more
This is totally wrong. Metaboxes are shown on post/page editing screen, so if you submit your own form, the whole page will be submitted/refreshed. Look up what a metabox is here => SO Thread You should use WP’s own functions to deal with this. Look add_meta_box() and check this tutorial to know how you should … Read more
Never mind. I found a version of Magic Fields that supports custom post types. You can find it here: https://github.com/attitude/Magic-Fields It looks like it is just a mod on Magic Fields to allow custom post types. And it works good so far
The metabox div gets an ID of ‘meta_’ + your metabox ID, thus: Sorry, that was me looking at my own metaboxes, forgetting that I actually prefix them like that to differentiate the container from elements within the container 🙁 Let’s work through your code and see if we can find the answer. First, your … Read more
Maybe they are just disabled? I’ve already seen a lot of people tripping over this one: On the top right of the edit screen you can see “Screen Options”. If you open this section you can enable and disable meta boxes. Maybe yours is deactivated? Source: Screen Options
Here is few steps: Right click on your area what you want to change/remove and inspect in console. Find in console HTML part what you want change/remove Look if have some ID or unique class. If you find some unique ID or class, just simple add custom CSS in your template with property display:none !important; … Read more
Meta boxes are saving data at each post ($post_id) $value = get_post_meta($post_id, ‘name’, true); name=”dbt_text” or ‘dbt_text1’ so $value = get_post_meta($post_id, ‘dbt_text’, true); $value1 = get_post_meta($post_id, ‘dbt_text1’, true); ~ more info on get_post_meta
I tried your code and it works: I changed the wp_verify_nonce function, because that wasn’t working for me. I added an action instead of what it had. Now, for this to work, you have to create a nonce field with a code like this, of course that you can change the names if you want. … Read more