Sign in
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Exclude options with {{#getPostsByTags}} helper

  • This topic has 1 reply, 2 voices, and was last updated 5 months, 2 weeks ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10519
    Avatar photoTravsVoid

    Is it possible to exclude a status when using this helper? Reading over the docs I don’t think it currently does, I would like to exclude posts with the excluded_homepage or hidden status. Of course I see the option to exclude individual posts but excluding statuses would make it automatic in my case. Even excluding tags would be a nice option as well.

    #10602
    Avatar photoTomasz Dziuda

    Hi,

    Under allowed option, you can specify which post statuses will be retrieved, so you can list in this option only statuses which you want to display. In theory 🙂 Because now I see that it does not allow you to exclude hidden/featured etc. posts, because all posts will have published status so always will fall into condition.

    In upcoming Publii v.0.43 we will add excluded_status param to allow excluding e.g. hidden posts:
    https://github.com/GetPublii/Publii/commit/e3a8f7e54593cfe81d5b6e79d91f9b968673fd0d

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.