• Resolved iamarogue

    (@iamarogue)


    Hi there,

    I really like your plugin, but I’m having a little issue getting it set up.

    <h1>Our Products</h1>
    [loop type="product" product_cat="planning" orderby="rand" columns="3" pad="0px 10px" count="3"]
      <a href="[content field="url"]"><h3>[content field="title"]</h3></a>
      [content field="excerpt" more="true"]
    [/loop]
    
    <h1>Recent Projects</h1>
    [loop type="project" project-category="housing-plans" orderby="rand" columns="3" pad="0px 10px" count="3"]
      <a href="[content field="url"]"><h3>[content field="title"]</h3></a>
      [content field="excerpt" more="true"]
    [/loop]

    The first loop runs perfectly correctly. I copied and pasted, then changed the post type and taxonomy for the second one. The second works fine EXCEPT that it doesn’t filter by taxonomy at all (currently the output is all projects, well 3 of them anyways).

    My content page says:

    Project Categories – project-category

    Housing Plans – housing-plans
    Our Planning & Policy Products – planning
    Our Tools You Can Use – tools
    Plans to End Homelessness – plans-to-end-homelessness
    Point in Time Homeless Counts – point-in-time-homeless-counts
    Professional Development & Coaching – project-training
    Program Development – program-development
    Program Evaluation – program-evaluation
    Research & Evaluation – project-research

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

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

    (@miyarakira)

    Hello,

    Here is the syntax for filtering by taxonomy:

    [loop type="project" taxonomy="project-category" value="housing-plans"]

    I see that the documentation is not clear on this point, so I’ll make a note to update it.

    It’s nice to see how you’re using different plugin features like columns, random order, content overview. Please let me know if you need more information.

    Thread Starter iamarogue

    (@iamarogue)

    Awesome, that works perfectly. Well of course it should, you wrote the plugin!

    I guess I was getting thrown off by the fact that the first loop functioned correctly (which was probably some sort of fluke).

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Loop not filtering properly’ is closed to new replies.