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(...


12

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', '...


11

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

Thanks for the hint Bainternet, indeed this is very easy to implement with jQuery. Example (the four meta boxes are closed for clarity) : Here's what I did : var $j = jQuery.noConflict(); $j(document).ready(function() { $j("#side-sortables").append('<div id="container_div" class="postbox meta-box-sortables ui-sortable"><div class="handlediv" ...


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

As long as haven’t touched the slug WordPress will generate a new one after you entered a title. Update To change other peoples slugs use a filter (not tested!): add_filter( 'wp_insert_post_data', 'prevent_numeric_slugs', 10, 1 ); function prevent_numeric_slugs( $post_data ) { if ( ! isset ( $post_data['post_title'] ) or ! is_numeric( $...


5

you want to use admin_print_scripts-(page_hook) and admin_print_styles-(page_hook), so in your case: add_action('admin_print_scripts-post.php', 'call_my_function'); add_action('admin_print_scripts-post-new.php', 'call_my_function'); add_action('admin_print_styles-post.php', 'call_my_styles_function'); add_action('admin_print_styles-post-new.php', '...


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

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

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

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

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

What you're asking for is not possible because of the security checks for user capabilities and admin referrer checks. It would be best for you to create a form on the front-end and use the wp_insert_post() if(isset($_POST['foo_bar'])): //Verify nonce and referrer //Validate data $args = array( 'post_status' => 'draft', '...


3

Not sure if it would work but have you checked out Scribu's front-end editor? http://scribu.net/wordpress/front-end-editor or check this thread http://wordpress.org/support/topic/front-end-custom-form-to-post?replies=5#post-1584286


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

Adjust HTML-Filter: <?php function fb_change_mce_options($initArray) { // Comma separated string od extendes tags // Command separated string of extended elements $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'; if ( isset( $initArray['extended_valid_elements'] )...


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

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....


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