• Resolved davidanielyan

    (@davidanielyan)


    Hello dear friends, I have a code

    [related taxonomy=’cat_vardzakalutyun’ paged=10]
    <div class=”posts”>
    <h2>[field title]</h2>
    <div class=”part-1″>
    [field image size=thumbnail]
    </div>
    <div class=”part-2″>
    <span>[field veranorogum-3]</span>
    </div>
    <div class=”part-3″>
    <span class=”price”>[field veranorogum-4] Dolar</span>
    <span class=”more”>More</span>
    </div>
    </div>
    [if empty]
    <h3>Doesnts exist any category</h3>
    [/if]
    [/related]

    That I use in taxonomy-mytaxonomy.php

    It display Only parent categorie’s posts but not subcategory posts, For Example I have this structure of taxonomy
    -First Taxonomy
    –First Child Taxonomy
    -Second Taxonomy
    -Thierd Taxonomy

    And for the each category I wrote a post.
    After it I can desplay all posts for all Parent taxonomy, but I can’t display posts for Child taxonomy like “First Child Taxonomy”.

    PLEASE HELP ME.

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

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

    (@miyarakira)

    Hello,

    I tested this, and [related] should be getting child taxonomies by default.

    One idea – for the posts that are in First Child Taxonomy, is it possible to select both parent and child taxonomies? That might make a difference.

    Thread Starter davidanielyan

    (@davidanielyan)

    I didn’t understand what you said. Can you specify this message?

    “One idea – for the posts that are in First Child Taxonomy, is it possible to select both parent and child taxonomies? That might make a difference.”

    Plugin Author Eliot Akira

    (@miyarakira)

    Oh, I meant in the post edit screen where you select the taxonomy for the post, if it’s possible to select First Taxonomy and First Child Taxonomy.

    Maybe it doesn’t make sense to do it that way in your situation. I’ll make more tests to see if it can be improved.

    Thread Starter davidanielyan

    (@davidanielyan)

    @eliot Akira,

    Ok I Understand you. In our situation it is bad idea. I can’t do it anytime for any posts which need to be in “First Child” taxonomy.
    Have you any other idea that can help me for this situation?

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    Please try the following with the newest plugin update:

    [related taxonomy=cat_vardzakalutyun children=true count=10]

    Dear Friends,
    I am new to Custom Content Shortcode so am learning how to use it.
    I like what I see so far.

    I am trying to display all children of a specific parent category in woocommerce. For each of the children in the specific parent category I want to display the child title, image and image-caption.

    I thought the following code should work. I don’t understand why it does not.

    ‘[for each=”product_cat” parents=”true”]
    [loop type=”product” taxonomy=product_cat term=brand]
    <h2 style=”color: #ffffff; background-color: #0047b2; text-align:center;”> <b>Pumps By: [field title]</b></h2>
    [/loop]
    [-for each=”child” current=”true”]
    <h3 style=”color: #000000; background-color: #99c2ff; text-align:center”> <b> Subcategory: [-each]</b></h3>
    <b> [field title] </b>
    [field thumbnail]
    [field image-caption]
    [/-for]
    [/for]’

    I also tried the ‘related’ as follows, but it didn’t work either.

    ‘[related taxonomy=product_cat children=”true” term=brand]
    <b> [field title] </b>
    [field thumbnail]
    [field image-caption]
    [/related]

    Everything works fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Child taxonomy page does't display posts’ is closed to new replies.