WordPress.org

Ready to get started?Download WordPress

Forums

Make Drafts Display in a List (4 posts)

  1. joshteeters
    Member
    Posted 8 years ago #

    How would I go about making the drafts, listed at the top of the Write screen, display in a list, i.e.:

    * Draft #1
    * Draft #2
    * Draft #3

    I keep a lot of drafts, and when they're just separated by a comma, it's sometimes a pain to find what I'm looking for.

  2. ederic
    Member
    Posted 8 years ago #

    I would also appreciate an answer to this question. :)

  3. whooami
    Member
    Posted 8 years ago #

    edit this in /wp-admin/edit.php

    if ($drafts || $other_drafts) {
    ?>
    <div class="wrap">
    <?php if ($drafts) { ?>
    <p><strong><?php _e('Your Drafts:') ?></strong>
    <?php
    $i = 0;
    foreach ($drafts as $draft) {
    if (0 != $i)
    echo ', ';
    $draft->post_title = stripslashes($draft->post_title);
    if ($draft->post_title == '')
    $draft->post_title = sprintf(__('Post #%s'), $draft->ID);
    echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
    ++$i;
    }

    good luck.

  4. ederic
    Member
    Posted 8 years ago #

    Thanks, what are the appropriate changes to the code? :)

Topic Closed

This topic has been closed to new replies.

About this Topic