Site logo

[Resolved] adding multiple custom taxonomies on elements header

Home Forums Support [Resolved] adding multiple custom taxonomies on elements header

Home Forums Support adding multiple custom taxonomies on elements header

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #712561
    Purushottam

    Hi there, I would like to show multiple taxonomies on my elements header, single posts page. here’s what i have so far:

    In ACF, I am creating two new custom taxonomy select fields, Skill level( absolute beginner, beginner, etc) and Type(concept, actionable, research) and assign to posts while creating them.

    here’s the header card element html:
    <p>
    Written By: {{post_author}}
    <br/>
    Published on: {{post_date}}
    <br/>
    Category: {{post_terms.category}}
    <br/>
    Type: {{custom_field.type}}
    <br/>
    Skill Level: {{custom_field.skill_level}}
    </p>
    1. I want to display the particular taxonomy with link so one can click on for eg. “Absolute beginner”(skill Level) or “Actionable”(type) and get an archive of all the posts with skill level set to “Absolute Beginner” and likewise
    2. Is it possible to do this without using advanced custom fields? or even without editing php code?

    #712733
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are those custom taxonomies, or are they custom fields?

    The code above will output custom fields.

    If they’re custom taxonomies, you would do this:

    {{post_terms.type}}
    {{post_terms.skill_level}}
    #712810
    Purushottam

    {{post_terms.type}}
    {{post_terms.skill_level}}
    Above does not work. I thinks I have created custom fields(taxonomy type) using ACL.
    The code that I am using , (Type: {{custom_field.type}}) returns me only the taxonomy id. Anyway can I build a link from it in the element html editor? How?
    if not, Any recommendations for a good custom taxonomies plugin?

    #712870
    Purushottam

    This could work too:
    If I am able to display multiple categories, like using a variation of {{post_terms.category}} or something where i can select which parent category’s child to display, it would solve my query.

    for eg. currently, i am getting :
    Category: Absolute Beginner, Concept, SEO
    Type: Absolute Beginner, Concept, SEO
    Skill Level: Absolute Beginner, Concept, SEO

    What i want:
    Category: SEO
    Type: Concept
    Skill Level: Absolute Beginner

    My category structure:
    1. SEO, no child categories, Primary
    2. Type->Concept
    3. Skill Level->Absolute Beginner

    Make Sense?

    #713291
    Tom
    Lead Developer
    Lead Developer

    Any chance you can link me to an archive page of one of those taxonomies? For example, the page that lists all posts associated with “Absolute Beginner”?

    #713346
    Purushottam
    #713743
    Tom
    Lead Developer
    Lead Developer

    Have you considered using custom taxonomies instead of only categories?

    That way you could use the structure I mentioned above. I also think they would make more sense for what you’re doing.

    #715111
    Purushottam

    Thanks Tom! Using Custompress to create custom taxonomies and {{post_terms.skill_level}} to create links on header.

    #715745
    Tom
    Lead Developer
    Lead Developer

    Awesome 🙂

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