• Resolved ldebacker

    (@ldebacker)


    Hi,
    I’m trying to display something for each existing category.

    But I would like to avoid displaying uncategorized items.

    I was hoping to use the IF clause, but this doesn’t work: uncategorized items appear anyway.

    Any clue?

    [for each=”category”]
    [if not category=”Uncategorized”]
    Category: [each name]
    [loop type=”page” orderby=”title”]
    [content field=”title”]
    [/loop]
    [/if]
    [/for]

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 1 replies (of 1 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    Please try: [if not category="uncategorized"]

    The parameter takes a category slug, so it should be lowercase.

Viewing 1 replies (of 1 total)

The topic ‘IF for Uncategorized items’ is closed to new replies.