Multiple wp_editor instances in custom post type using Ajax

forget about using wp_editor on such scenario.. instead use the core tinymce, something like; tinymce.init({ //selector: ‘customEditor-‘ + nextPlusSignId, editor_selector: ‘nwac_editor_’ + nextPlusSignId, mode: “specific_textareas”, media_buttons: false, menubar: false, content_css: nw.baseurl + ‘/skins/wordpress/wp-content.css’, body_class: ‘mce-content-body nwac_plus_signs_’ + nextPlusSignId + ‘_template post-type-products post-status-publish mceContentBody webkit wp-editor wp-autoresize html4-captions has-focus’, });

Show button if meta box has content, else hide

Check to see if it’s empty before you show the div. <?php $true_title = get_post_meta( $post->ID, ‘true_title’, true ); ?> <?php if( ! empty( $true_title ) ) : ?> <div class=”discuss”><a href=”https://wordpress.stackexchange.com/questions/166858/<?php echo $true_title; ?>”>Discuss…</a></div> <?php endif; ?>

Custom meta box in custom post type not working

Hey Change Callback function to like this and add_meta_box to add_meta_boxes hook function create_meta_box_slider() { add_meta_box( ‘new-meta-boxes-slider’, __(‘slider Settings’), ‘new_meta_box’, ‘slider’, ‘normal’, ‘high’ ); } add_action(‘add_meta_boxes’, ‘create_meta_box_slider’); function new_meta_box() { global $meta_box_groups; $meta_box_groups[] = $slide_info; } I think it work fine

How do I add an item to the WP admin menu?

You could do it with something like this in theme functions.php (at end) add_action(‘admin_menu’, ‘news_admin_test’); function news_admin_test() { add_menu_page( ‘News Page Title’, ‘News Option’, ‘manage_options’, ‘newspage’, ‘show_menu_news’, get_home_url() .’/wp-content/themes/my_theme/assets/img/logo.png’ ); } function show_menu_news () { echo ‘News content’; }

saving dropdown menu data on custom post type

I’ve found my problem. The choice was indeed being saved, just wasn’t showing to me at the editor (it was always showing me the first choice). The thing is, the $selected function compares the selected input with the string provided which, in my case, was incorrectly filled. so the following code: <select name=”estadoDaObra” id=”estadoDaObra”> <option … Read more