WPAlchemy: How to output values?
WPAlchemy: How to output values?
WPAlchemy: How to output values?
wp_editor in metabox not working
I am not sure if this is what you want: (Source: https://stackoverflow.com/questions/3493313/how-to-add-wysiwyg-editor-in-wordpress-meta-box) add_action( ‘add_meta_boxes’, ‘adding_new_metaabox’ ); function adding_new_metaabox() { add_meta_box(‘html_myid_61_section’, ‘TITLEE Helloo’, ‘my_output_function’); } function my_output_function( $post ) { //so, dont ned to use esc_attr in front of get_post_meta $valueeee2= get_post_meta($_GET[‘post’], ‘SMTH_METANAME_VALUE’ , true ) ; wp_editor( htmlspecialchars_decode($valueeee2), ‘mettaabox_ID_stylee’, $settings = array(‘textarea_name’=>’MyInputNAME’) ); } function … Read more
Add a custom field to top attribute in WooCommerce
Here is what i have did as a workaround, i realized we cant do that in TDD way.so its better to write the code first instead of writing the test when you face this problem. So in my code i have added this add_meta_box( ‘meta-box-id’, __( ‘My Meta Box’, ‘textdomain’ ), ‘wpdocs_my_display_callback’, ‘post’ ); and … Read more
If the meta field starts with an underscore, it will be hidden in the interface by adding the class hidden to the <tr> element. You could also apply this class by yourself using Javascript, the <tr> element has an id of meta-{$custom_field_id}.
would this be heading in the right direction?.. See Mikes Code
Try this one: jQuery( document ).ready( function($) { // Starts by hiding the “Video Options” meta box $( “#video-options” ).addClass( “hidden” ); if( $( “input#post-format-video” ).is(‘:checked’) ){ $( “#video-options” ).removeClass( “hidden” ); } // If “Video” post format is selected, show the “Video Options” meta box $( “input#post-format-video” ).change( function() { if( $(this).is(‘:checked’) ){ $( … Read more
Basics First you need to register the Google JSAPI script. Else you won’t have access to it. And you will need to hook it to admin_enqueue_scripts to have it available in the meta box. Also the JSAP needs to get loaded before your custom script, so you need to set it as dependency. Example: add_action( … Read more
WordPress.org UI Style Guide site has some reference materials, including those on Box Formats and Forms. As far as I remember it’s not consistently maintained or considered especially canonical source. In practice elements are often done after studying current state of actual admin markup.