51

Simply add a meta box using the advanced context, and high priority Then, latch on to the edit_form_after_title hook Print your meta boxes out there, then remove it so it doesn't appear twice. // Move all "advanced" metaboxes above the default editor add_action('edit_form_after_title', function() { global $post, $wp_meta_boxes; do_meta_boxes(...


14

Here is how you can move specific meta boxes above the editor, but before I post the code I just would like to thank Andrew and mhulse. You guys rock! function foo_deck( $post_type ) { if ( in_array( $post_type, array( 'post', 'page' ) ) ) { add_meta_box( 'contact_details_meta', 'Contact Details', '...


12

To provide a full code example based on Andrew's answer ... I needed a way to include a "Deck" (aka subhead) to my posts; I wanted the deck field to appear after the main title bar. /** * Add a "deck" (aka subhead) meta box to post page(s) and position it * under the title. * * @todo Move to class. * @see http://codex.wordpress.org/Function_Reference/...


10

This is not really an answer, just an attempt to find the specific context for this problem. Please install the following plugin on your site, try to set the three dates and add your result to the second <pre> in the table below. /* Plugin Name: WPSE Sysinfo */ add_action( 'admin_footer', 'wpse_sysinfo' ); function wpse_sysinfo() { $bit = ...


9

This will get you started; add_action( 'post_submitbox_misc_actions', 'custom_button' ); function custom_button(){ $html = '<div id="major-publishing-actions" style="overflow:hidden">'; $html .= '<div id="publishing-action">'; $html .= '<input type="submit" accesskey="p" tabindex="5" value="Customize Me!" class="...


9

You cannot use a real metabox to do that, hook into edit_form_after_title instead. Here is a simple example: add_action( 'edit_form_after_title', 'wpse_87478_pseudo_metabox' ); add_action( 'save_post', 'wpse_87478_save_metabox' ); function wpse_87478_pseudo_metabox() { global $post; $key = '_wpse_87478'; if ( empty ( $post ) || 'post' !== ...


7

Question and expectations While the literal form of this question is practical in context (year 1899) it is a little vague in theoretical sense. How old is old? How far into the past we might want to go? What about the future? Since WordPress had started out as blogging engine, in that contextual sense it evolved to handle following span of time: dates WP ...


6

Instead of moving everything in the advanced section to the top, why not create a new section and move that to the top: // Create 'top' section and move that to the top add_action('edit_form_after_title', function() { global $post, $wp_meta_boxes; do_meta_boxes(get_current_screen(), 'top', $post); unset($wp_meta_boxes[get_post_type($post)]['top']); });...


6

No, 'wp' action hook is not triggered on post edit page. This hook is a query-related hook, it means that it runs everytime a posts query is triggered from an url. For this reason it's a more frontend hook (it runs on every frontend request), even if is triggered in some edit pages, more specifically, in the admin pages that do a post query: edit.php (so ...


6

It appears to be a bug, but one that can be hacked around each time it happens with about 2 seconds of work. This wordpress forum thread: If you're using Chrome, right-click on the greyed-out "Update" button and select "Inspect Element". You will see something to the likes of: <input name="save" type="submit" class="button button-primary ...


6

To disable the inline link tool and revert it back to a pop-up screen instead, do the following: In your child theme directory, add the following to your function.php: add_filter( 'mce_external_plugins', 'wpse_236590_link_editor' ); function wpse_236590_link_editor( $plugins ) { $plugins['full_link_dialog'] = plugins_url( 'js/', __FILE__ ) . 'editor....


5

This will be possible in the upcoming version WordPress 3.4. Try the Beta or just wait. Here is a screen shot (incomplete translation to German):


5

Here I tested this code and its working fine and steps here. I am just creating a dummy custom_post_type here book with the following code. function kv_custom_post_books() { $args = array( 'public' => true, 'label' => 'Books', 'taxonomies' => array('category', 'post_tag') , 'supports' => array( 'title', 'editor'...


5

First try: A bad one Have you tried this solution? With a few adaptions it should work for your question too. Second try: A real approach with a solution! If you want to use an URL based featured image, without saving the image file in your WordPress installation, but still use the implemented WordPress functions within your Theme/Plugin, you need to know ...


5

So, I may or may not go to hell for this, but I made a quickfix plugin that bypasses the inline part and just opens the link editor. You can find it here. I didn't spend much time testing it, if you find problems make issues in github and I will see if I can fix it. The way it works is that I removed wplink as a plugin from tinyMCE, then added wplinkc, ...


4

To see how such a list can be created look at the code in wp-admin/includes/nav-menu.php. Unfortunately, it is hard coded there, so you have to re-create the code. First, let’s create two menus: We can get these menus in PHP with wp_get_nav_menus() (a wrapper for get_terms()): $menus = wp_get_nav_menus(); print '<pre>' . htmlspecialchars( print_r( $...


4

There is a filter at the end of the function: 'get_sample_permalink_html'. Hook into this and just replace the shortened form with the full length. <?php # -*- coding: utf-8 -*- /* Plugin Name: T5 Unabridge Permalink Slug */ add_filter( 'get_sample_permalink_html', 't5_unabridge_sample_permalink', 10, 2 ); /** * Replaces the shortened permalink with ...


4

I wouldn't use that hook. Here's why Try something like this using admin_notices. function wpsites_admin_notice() { $screen = get_current_screen(); if( 'post' == $screen->post_type && 'edit' == $screen->base ){ ?> <div class="error"> <p><?php _e( 'Updated Demo Message!', 'wpsites' ); ?></p> </div> <?...


4

Here's a small screenshot of what this code produces: Demo Editor is a new user i added with Editor status and then logged in as Demo Editor and modified a post to test this solution works. You can create a custom template tag in your child theme like this and add the template tag in your content.php file. All depends on your theme. Tested and works on ...


3

Using remove metabox function you can do this. Simply put this inside your themes functions.php file at very end. NOTE - unwrap <?php ?> if necessary. <?php function wpse60590_remove_metaboxes() { remove_meta_box( 'categorydiv' , 'post' , 'normal' ); remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'normal' ); } add_action( 'admin_menu' ...


3

Its not possibel via filter or action hook, WordPress cut the strings hard in core. see wp-admin/includes/post.php line 1110 in WP 3.4alpha if ( function_exists('mb_strlen') ) { if ( mb_strlen($post_name) > 30 ) { $post_name_abridged = mb_substr($post_name, 0, 14). '&hellip;' . mb_substr($post_name, -14); } else { $...


3

In my experience, the default "Pages" is easy enough for people to understand..it is where you edit each page. You can make a "Videos" page template for a Videos page that can show the page content at top "your text areas" and then calls a listing of all the custom post type Videos you created. I just worked on a site with CPT for videos so here is some ...


3

The visual editor is an TinyMCE implementation. The first way to repace a selected text, is to write a plugin for the TinyMCE. If you do not want to write a plugin, use the tinyMCE object: add_action( 'admin_footer', 'tinyNagging' ); function tinyNagging() { echo ' <script type="text/javascript"> jQuery(document).ready( function() { window....


3

You can also try playing with the focusout Javascript event and the focus() method: Here is a demo Subtitle plugin: /wp-content/plugins/subtitle/subtitle.php <?php /** * Plugin Name: Subtitle */ function custom_add_input() { // your function code above ... } add_action( 'edit_form_after_title', 'custom_add_input' ); function subtitle_script( $...


3

You could use ajax and the admin_footer-post-new.php hook. The sql would vary depending on whether you want the highest or most recently published order number. The following returns the highest published order number + 1: function wpse155926_set_menu_order() { $ret = array(); if ( check_ajax_referer( 'wpse155926_set_menu_order_post', 'nonce', ...


3

Here's what I came up with. So far it doesn't seem to have broken anything: add_filter('tiny_mce_before_init', 'modify_formats'); function modify_formats($settings){ $formats = array( 'bold' => array('inline' => 'b'), 'italic' => array('inline' => 'i') ); $settings['formats'] = json_encode( $formats ); return $settings; ...


3

I'm running the most up to date version of WordPress which has made changes to how permalinks are displayed and handled. There's no longer a View Post button. I was able to remove the whole area using the get_sample_permalink_html hook. Just return an empty string: function hide_permalink() { return ''; } add_filter( 'get_sample_permalink_html', '...


3

Please replace $post_type with your post_type in question, e.g. post, page, cpt_slug,… The function echoing the meta box with the preview button is called post_submit_meta_box. The condition to show the button is set with the function is_post_type_viewable. Following that: If the {$post_type}s flags publicly_queryable or _builtin and public are set to true ...


2

note that wp_editor will echo to output, not put it in a variable. If you want to put it in a variable, just do ob_start(); wp_editor($content, 'textarea_rich', $args); $html = ob_get_contents(); ob_end_clean(); and you have what you need in $html. You can also see https://plugins.svn.wordpress.org/indypress/tags/1.0/indypress/form_inputs/tinymce.php for a ...


2

Put this on the top of your functions.php file after the first <?php add_action( 'admin_print_styles-post.php', 'my_admin_css' ); add_action( 'admin_print_styles-post-new.php', 'my_admin_css' ); function my_admin_css() { ?> <style type="text/css"> #editorcontainer textarea#content { font-size:130%!important } </style> <?php } The ...


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