Multiple TinyMCE Editors in one Admin Page
You’ll need to use add_meta_box() to setup the field and wp_editor() to make a new instance of TinyMCE.
You’ll need to use add_meta_box() to setup the field and wp_editor() to make a new instance of TinyMCE.
edit_attachment Runs when an attached file is edited/updated to the database. Action function arguments: attachment ID This is found deocumented in the Codex under the Action Reference. Please take a closer look at the Codex before posting questions related directly to syntax. 🙂
This jQuery code seems to work, when added via the admin_footer hook. #submitdiv = the whole Publish metabox .misc-pub-section = each UI section (except the Publish and Save sections) .hide-if-js = the fields that are hidden by default $(‘#submitdiv .misc-pub-section’) .has(“#post-status-display, #timestamp”) .find(‘.hide-if-js’) .toggle(); That will unhide the Status dropdown and the Date picker.
How are you outputting the category description? You might need to use something like apply_filters(‘the_content’, category_description( $category_id )); or wpautop(category_description( $category_id )); to have paragraphs in the output. Edit: Adding what you had in JSFiddle – note where $term->description is, I wrap it in wpautop. See if that works. If not, try apply_filters(‘the_content’, $term->description) instead: … Read more
@dalbeab already answered your question, but thought I would point out a way to add horizontal rule to your editor if you wish. Within functions.php, you can add this: // add horizontal rule button function enable_more_buttons($buttons) { $buttons[] = ‘hr’; return $buttons; } add_filter(‘mce_buttons’, ‘enable_more_buttons’); Then you will have a TinyMCE button that looks like … Read more
Ok, so this is how I did it. This hook into the admin head, find the screen options part and set the default checked radio button to 1, which mean full screen. Just found the answer from here and give it a little modification: add_action( ‘admin_head’, ‘wpse1152474_post_editor_columns’); function wpse1152474_post_editor_columns() { global $pagenow, $typenow; if ($pagenow … Read more
You should use wpautop, and in your CSS styles (editor styles + theme styles) make sure that any paragraphs are properly spaced. p { margin-bottom: 20px; } or p + p { margin-top: 20px; }
For any other readers I’d like to add in advance that this only really makes sense if you are kind of creating drafts or templates or whatever you want to call it that will be changed later on. Otherwise you’ll at least deal with SEO penalties due to duplicate content. Unfortunately this functionality isn’t part … Read more
As pointed out by @karun, the text first needed to be made into a hyperlink, after which the formats became active. Changing the array values to array( ‘title’ => ‘Grey Button’, ‘block’ => ‘div’, ‘classes’ => ‘cta gry’ ), made the style permanently available.
It’s easier then you thought! Just add this code to the functions.php file in your theme. function prefix_set_default_editor() { return ‘text’; } add_filter( ‘wp_default_editor’, ‘prefix_set_default_editor’ );