Tag Info

Hot answers tagged

2

Per comments, an alternative is to use the built-in Firefox debugger instead (Inspect Element (Q)) - it's very good (now) and is (almost completely) unaffected by the WP heartbeat.


2

When adding a metabox, the metabox itself isn't saved in the database. It's loaded from the plugin code that is written, then it's up to you to fill it with appropriate values. You don't have to create additional fields in the DB. There is a function: update_post_meta($post_id, $meta_key, $meta_value); In your case you might do something like: ...


1

I just found a way around the problem, but it's a kludge, so I won't accept my own answer unless nobody has a "real" solution. If I set a break-point in my JavaScript and do my investigation while it's paused, that prevents all future script from running, including whatever script is refreshing the page.


1

The simplest explanation is that the HTML rendered in your code does not match what you're actually looking for. Without seeing the JS responsible for the slider, it's impossible to say where you went wrong, but you should compare the mocked-up version (that works) with what you're actually getting (HTML source after page render) to see if there were any ...


1

Solved it by using a modal box instead of metabox, forcing the users to finish editing the plugin data, before submitting the regular changes to WP. //add_action( 'add_meta_boxes', array( $this, 'add_custom_metabox' ) ); add_action( 'media_buttons_context', array($this, 'add_custom_media_buttons' ) ); add_action( 'admin_footer', array($this, ...


1

You should be able to get the current product id using the using the $post global variable and use that with the WooCommerce function get_product() to the the product object and test its product type. public function __construct() { add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) ); } public function add_meta_box( $post_type ) { ...


1

You could try running the content of the custom field through the do_shortcode() function when you output. e.g. given a custom field name of 'custom field' echo do_shortcode( get_post_meta($post->ID, 'custom-field', true) );


1

Try echo html_entity_decode($ccontent) .



Only top voted, non community-wiki answers of a minimum length are eligible