Support » Plugin: Display Posts - Easy lists, grids, navigation, and more » Does not list posts with ‘archive’ status (made by another plugin)

  • Resolved staydry

    (@staydry)


    Hi,

    Trying to use your plugin for listing posts archived with ‘LH Archived Post Status’ plugin ( https://wordpress.org/plugins/lh-archived-post-status ), but looks like it does not recognize their ‘archive’ status (looks so at least). When trying this –

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

    – then as an output have list of all posts (same happens when any nonexistent status at post_status=”” is stated).

    Have already informed that plugin author reg. this issue, but would like to check at you whether your plugin works with custom (non-standard) WP statuses.

    (trying on WP 4.6, your plugin ver. 2.8.0, LH Archived Post Status ver. 2.15)

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    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.

    Thread Starter staydry

    (@staydry)

    Thanks for the prompt reply, Bill.

    I see. But appears that just adding custom post statuses names to that array allows your plugin to handle them, so for ‘LH Archived Post Status’ plugin adding ‘archive’ (its custom post status) solves the matter –

    $available = array( ‘publish’, ‘pending’, ‘draft’, ‘auto-draft’, ‘future’, ‘private’, ‘inherit’, ‘trash’, ‘any’, ‘archive’ );

    So if you wish you can update this string in your plugin next version. And until you make general support of custom post statuses (or may be instead of that) you can just add to this array custom statuses of popular plugins – so your plugin will support them all.

    Plugin Author Bill Erickson

    (@billerickson)

    That is a list of all the WordPress core post statuses. I can’t simply add your custom one because the vast majority of sites do not have that post status. The whole purpose of that area of code is to ensure a valid post status was specified.

    What I was requesting was information from the plugin developer on what they are modifying inside of WordPress internally to support custom statuses, and what the best way to support that would be. For instance, WordPress has a function called get_post_stati() – would using that support custom statuses, but still ensure the list is only valid post statuses?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does not list posts with ‘archive’ status (made by another plugin)’ is closed to new replies.