WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't change the permalink after the post is published? (2 posts)

  1. hilj
    Member
    Posted 2 years ago #

    Hello,

    • Publish post
    • Click edit next to permalink
    • Change it and click Ok, all looks good
    • Update the post
    • The permalink reverts back to the original
    • The trash is empty, so there is no posts with the same name in the trash.
    • I'm hosted in Media Temple.
    • Permalink settings are %postname%

    I have these rewrite rules in my .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Hopefully somebody can help me with this bizarre problem. This has happened to me with some other installations also. All help is appreciated, thanks! :)

  2. hilj
    Member
    Posted 2 years ago #

    Solved it.

    I was specifying in my functions.php file not to show some metaboxes, and you obviously need to have the slug metabox showing in order to change the permalink.

    Just comment it out.

    add_action('admin_menu', 'dbt_remove_boxes');
    
    function dbt_remove_boxes(){
        remove_meta_box('authordiv',          'post', 'normal');
        remove_meta_box('categorydiv',      'post', 'normal');
        remove_meta_box('commentstatusdiv', 'post', 'normal');
        remove_meta_box('commentsdiv',        'post', 'normal');
        remove_meta_box('formatdiv',          'post', 'normal');
        remove_meta_box('postexcerpt',        'post', 'normal');
        remove_meta_box('postcustom',         'post', 'normal');
        remove_meta_box('postimagediv',       'post', 'normal');
        remove_meta_box('revisionsdiv',       'post', 'normal');
        //remove_meta_box('slugdiv',            'post', 'normal');
        remove_meta_box('trackbacksdiv',      'post', 'normal');
        remove_meta_box('tagsdiv-post_tag',   'post', 'normal');
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags