• Hi guys, thank you for a great plugin. i have created a custom post type using custom post type UI named (pricelists)

    i have created a custom taxonomy and called it (product-types)

    how can i query posts and taxonomies?

    i can easily query custom posts, however im unable to query custom post types taxonomies terms. example below.

    [loop type=”pricelists” value=”product-type”][/loop]

    This does not work for me, i also have a few terms for the taxonomy product-types (mobiles, handbags) ect ect. How can i query custom post types (pricelists) taxonomy (product-type) terms (mobiles) so that i only see price lists that are mobiles.

    KInd regards

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter waynmeyer

    (@waynmeyer)

    I have also tested the allow html which doesnt seem to work at all. [loop type=”pricelists” allow=”<table></table><thead></thead><tbody></tbody><tr></tr><th></th><td></td>”][/loop]

    im going to install pure html and test if it works using this method.

    kind regards

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    From your description, I believe something like this will work:

    [loop type="pricelists" taxonomy="product-type" value="mobiles"]
        [content field="title"]
        [content]
    [/loop]

    This displays the title and post content from the custom post type pricelists, whose taxonomy product-type equals mobiles.

    Please make sure to have the exact name for post type, taxonomy, value, etc. You can check under Dashboard -> Content.

    Thread Starter waynmeyer

    (@waynmeyer)

    update: using purehtml in conjunction with your plugin works like a charm. i was hoping that the content filters wouldnt make your plugin shortcode disfunctional. just glad it works. is there any fix to help, so that we wont need another plugin to assist your code?

    kind regards

    Thread Starter waynmeyer

    (@waynmeyer)

    Hi Eliot

    the shortcode works like a charm thank you 🙂

    any idea why its strips my html?

    Plugin Author Eliot Akira

    (@miyarakira)

    If you mean the extra <p> and <br> tags automatically generated by the content filter – yes, unfortunately, these have definitely presented a challenge for using shortcodes inside the post editor.

    There is a parameter for the loop shortcode: clean=”true”. This removes all <p> and <br> tags, which you can manually place using [p] and [br] shortcodes. Not the most elegant solution, I’m afraid, but it may work for you.

    Another solution is to use a plugin like Raw HTML, to prevent the post editor (or switching to visual editor) from mangling the HTML and shortcodes.

    What I personally do is to place the code in folders/files, and load them using the [load] shortcode.

    Plugin Author Eliot Akira

    (@miyarakira)

    Or..perhaps I misunderstood. Do you mean that some HTML is stripped from the post content?

    There is also a parameter for the [content] shortcode: format=”false”, which you could try. As you can see with these different parameters, I’ve tried to address these formatting issues before.

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

The topic ‘Custom post type and custom taxonomy queries problems’ is closed to new replies.