WordPress page editor, changing the default page type

Hey, I need help setting the default column type used by page-columnist. It goes back to WordPress - the next page (by default), however I need its Normal plain page.

I am looking at the code and on line 456 we have an array of 'page_transitions'. the first element in the array matters

'default'=> true

but changing the second element to "default" => true is not like anything.

Any ideas?

+3
source share
1 answer

A quick fix, it seems that the "default" option does nothing.

In the templates 'function.php' file add this code,

function page_Column_Change_Default(){
    $current_file_name = basename($_SERVER['REQUEST_URI'], ".php");
    if( $current_file_name == "post-new.php?post_type=page" ):
        wp_register_script('page_Column_Change_Default',
        get_bloginfo('template_directory') . '/js/page_Column_Change_Default.js');
        wp_enqueue_script('page_Column_Change_Default');
    endif;
}

add_action('admin_init', 'page_Column_Change_Default');

js/folder "page_Column_Change_Default.js",

jQuery(document).ready(function(){
    jQuery("input[value='cspc-trans-ordinary']").attr('checked', 'checked');
    jQuery("input[value='cspc-trans-wordpress']").removeAttr('checked');
});

URL- URL- " " (post-new.php? post_type = page). , " ". , javascript .

( javascript) jquery .

0

All Articles