WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy List Shortcode
[Plugin Taxonomy List Shortcode] shows draft and private (3 posts)

  1. chinola
    Member
    Posted 3 years ago #

    "Terms containing published, password protected posts will be shown in the list.
    Terms containing only private, scheduled, draft or posts pending review will not be displayed in the list."

    I have one post that I have tried to all the settings I could think of and it's still showing. I have tried: draft, pending review and private.

    It's the only post for a specific taxonomy term so I get the term listed with a count of 1. When you click on that term I get not found.

    I tried creating a brand new post with a new term and also tried to take an existing post that had been public and change the settings.

    http://wordpress.org/extend/plugins/taxonomy-list-shortcode/

  2. Michael Fields
    Themer
    Plugin Author

    Posted 3 years ago #

    This is a known issue with displaying terms of custom taxonomies. Please see the Trac ticket here http://core.trac.wordpress.org/ticket/14084

    The only way I have found to fix it is when you register the taxonomy with WordPress set the 'update_count_callback' argument to '_update_post_term_count'.

    While this will definitely work in the short term, there are two things that you will want to consider:

    1. '_update_post_term_count' is a reserved function (most that begin with an underscore are) and it is generally a bad idea to rely on such functions from version to version. However, this is how WordPress itself registers categories and tags. Should be safe for 3.0 + 3.1.

    2. This fix should work for all examples that you listed, but it will not work for posts in the trash. For best results, do not use the trash or empty it frequently.

    Wish there was a better solution that I could offer you. Feel free to voice your concerns in the Trac ticket I mentioned before. The best possible solution to this issue IMHO would be a change to core.

  3. chinola
    Member
    Posted 3 years ago #

    thanks for all of that information. right now i've just taken the affected term off the draft post and i'll have to remember to put it back before it's published.

    hopefully it will be dealt with in 3.1, though it doesn't look likely right now. i would add a comment to the ticket if i could add something useful.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic