WordPress.org

Ready to get started?Download WordPress

Forums

Article Templates
Cannot create new templates (10 posts)

  1. nicholasbarry
    Member
    Posted 3 years ago #

    When I use the Create New Template form, and hit "Save", I'm taken to a page that says "You are not allowed to edit this post."

    The template has not been created, after doing this.

  2. benxiro
    Member
    Posted 3 years ago #

    can fix it by opening file manage.php, find the following lines:

    if ( isset( $_POST['ID'] ) ) {
    $_POST['post_ID'] = $_POST['ID'];
    }

    change them to:

    if ( isset( $_POST['ID'] ) ) {
    $_POST['post_ID'] = $_POST['ID'];
    unset ( $_POST['ID'] );
    }

    That's it! my wp3.2.1 is working great

  3. couponsmakecents
    Member
    Posted 3 years ago #

    I have looked all over the place and I cannot find my file manage.php. where is it?

  4. benxiro
    Member
    Posted 3 years ago #

    you'll find it in the folder of that plugin. I mean:
    wp-content/plugins/article-templates

  5. VentureMaker
    Member
    Posted 3 years ago #

    OK, I don't see such lines in manage.php
    More ideas? :)

  6. benxiro
    Member
    Posted 3 years ago #

    Oh, I'm sorry
    It's should be found in wp-admin/includes/post.php
    function wp_write_post()

  7. VentureMaker
    Member
    Posted 2 years ago #

    Well, my WP 3.2.1 already has this code in a way you proposed it.
    I mean, I don't have to change anything in /wp-admin/includes/post.php because it already has unset ( $_POST['ID'] ); line there.

    More ideas? :)

  8. MrWeeble
    Member
    Posted 2 years ago #

    OK, this is what worked for me

    In article-templates/manage.php change
    } elseif($_POST['action'] == 'new') {
    wp_write_post();
    }

    to

    } elseif($_POST['action'] == 'new') {
    unset($_POST['post_ID']);
    wp_write_post();
    }

    Which seems to now allow me to add new templates. I can't seem to delete them, but that isn't a deal-breaker for me

  9. A2JC4life
    Member
    Posted 2 years ago #

    Worked for me, too. Thanks!

  10. LookHomeward
    Member
    Posted 2 years ago #

    And for me. Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic