Custom Taxonomy to dropdown box on adminside wordpress
Use tis plugin https://wordpress.org/plugins/acategory-dropdown-list/ It may be help you
Use tis plugin https://wordpress.org/plugins/acategory-dropdown-list/ It may be help you
Metabox configuration is stored in the user meta, there are several of them so best way to find all out is to look at the ajax handlers code in \wp-admin\include\ajax-actions.php, therefor you should be able to set it up at user creation time to whatever value you want.
There are different ways of saving the metaboxes. for e.g. you can create 2 files 1) test-spec.php 2) test-meta.php In test-spec.php file <?php //DEFINE VARIABLE TO STORE THE METABOX $content_test_meta = new WPAlchemy_MetaBox(array ( ‘id’ => ‘_content_test_meta’, //UNIQUE ID FOR THIS META BOX ‘types’ => array(‘post’), //LIMIT TO ONLY SHOW ON Default POST TYPE ‘template’ … Read more
Without seeing your code I can’t say whats wrong but here is a working (tested) example of a metabox with an editor inside that has the visual/text tabs. add_action( ‘add_meta_boxes’, function() { add_meta_box(‘html_myid_61_section’, ‘Meta Box Title’, ‘my_custom_meta_function’); }); function my_custom_meta_function( $post ) { $text= get_post_meta($post, ‘my_custom_meta’ , true ); wp_editor( htmlspecialchars_decode($text), ‘mettaabox_ID’, $settings = array(‘textarea_name’=>’inputName’) … Read more
You need to loop through your posts, and retrieve the metadata for each post. Add them to your array, and encode them to JSON. $posts = $query->get_posts(); foreach( $posts as &$thispost ) { // reference the current item $thispost->meta = get_post_meta( $thispost->ID ); } Now you got a WP_Post-Object, with all the post meta available … Read more
The TinyMCE editor have functions in his API to get the content of the editor. To get all content of selection use the follow source: tinyMCE.activeEditor.selection.getContent(); WordPress have since 4.3 a lot fo changes on the editor. Use always the API 4 for find the right functions in the documentation page. Here for documentation about … Read more
There is user settings (user metadata) which override the initial meta box order. So it is up to user which meta box he want to display first. User can drag and drop metaboxes and arrange them in any order which he want regardless the order you’ve defined. You can go to user meta table and … Read more
You need to query the db using wp_query to get all the posts from the CPT, save the metabox contents to an array and then print the array. Not tested but should work (i hope): <?php $select_array = array(); $args = array ( ‘post_type’ => ‘your_cpt’, ); $query1 = new WP_Query( $args ); while ( … Read more
<? // Check: // 1. If you are editing post, CPT, or page // 2. If post type IS NOT SET if( ‘post.php’ == basename($_SERVER[‘REQUEST_URI’], ‘?’ . $_SERVER[‘QUERY_STRING’]) && !isset($_GET[‘post_type’]) ) { // get post ID $postid = $_GET[‘post’]; // check the template file name if (‘my_template.php’ == get_page_template_slug($postid) ) { // add your metabox … Read more
So I figured this out almost immediately after posting this question (duh) function business_facts_output( $post ) { //so, dont ned to use esc_attr in front of get_post_meta $business_facts_value= get_post_meta($_GET[‘post’], ‘business_facts’ , true ) ; wp_editor( htmlspecialchars_decode($business_facts_value), ‘business-facts’, $settings = array(‘textarea_name’=>’business-facts’) ); } Basically this bit here, where it says htmlspecialchars_decode($business_facts_value) needs to be changed. the … Read more