• Resolved hbehrends

    (@hbehrends)


    Once I archive a post, it is removed from the main feed. That’s great! However, I would still like to have those posts visible in a separate “Archives” page. How can I accomplish both goals?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author shawfactor

    (@shawfactor)

    This not not part of my plugin per se but it is easily done.

    The easiest way would be to install a plugin that allows you to query by post_status eg:

    https://wordpress.org/plugins/display-posts-shortcode/

    and input the shortcode with the post_status of archive:, eg

    [display-posts post_status=”archive”]

    If you want to customise the display that shortcode has plenty of arguments.

    Hopefully this answers your question, if so please write a nice review 😉

    Plugin Author shawfactor

    (@shawfactor)

    I am resolving this for good order and will also add a faq item to the readme so that others can be helped.

    Strange, Peter, but this does not work for me (checking on WP 4.6, your plugin ver. 2.15, Display Posts Shortcode ver. 2.8.0).

    [display-posts posts_per_page=”100″ post_status=”archive”]

    Display Posts Shortcode (‘DPS’) plugin catches standard WP statuses well (Draft, Trash etc.), but does not recognize status ‘archive’: in output page it shows all available posts or pages. It reacts like this on any nonexistent status at post_status=”” – like ‘qwerty’ or something.

    Since DPS plugin seems to work well (at least looks so) there is may be some kind of discrepancy in ‘archive’ status announcement at WP environment?

    Plugin Author shawfactor

    (@shawfactor)

    DPS works for me, I tested it on one of my sites then:

    https://princesparktouch.com/testimus/

    What mode are you running my plugin in? Ie are archived posts private or just removed from the front page and feeds?

    Mode is standard: archived posts can be read publicly.

    Have additionally checked at SQL-database (‘wp_posts’ table, ‘post_status’ field): statuses for archived posts are ‘archive’, as should be.

    So may be that is an issue in WP 4.6 version related to custom statuses. When have chance to check on latest – will do.

    In addition

    Got an answer from ‘DPS’ plugin author on my question on custom post statuses support –

    —-quote—-
    Unfortunately no, this plugin does not currently work with custom post statuses. See here: https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L274

    I’d be happy to consider a patch from the other plugin author to support custom post statuses. Since I haven’t worked with custom statuses, I’m not sure the best method to validate them.
    —unquote—

    So if you have any practical code decision that can be suggested – suppose, it can be applied in ‘DPS’ new version. If you have time and wish for that, of course.

    May be just adding ‘archive’ to that array can help? 🙂

    Meanwhile can not explain to myself how that plugin did listing for ‘archive’ posts in your case since looks like it works with fixed limited quantity of standard WP statuses stated in its code. Hmm…

    > May be just adding ‘archive’ to that array can help?

    Yes!! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Possible to display archived posts in a separate “Archives” Page?’ is closed to new replies.