Malak Reyadh
Malak Reyadh

Reputation: 1

Pods Plugin Display Custom Taxonomy with Magic Tags on Pods Template

So I am using the Pod Plugin for my WordPress Website. And I want to use magic tags to display a custom taxonomy of a pod.

Little background info:

So i am using a pod template to display my recent projects. but with that I want to assign a custom color line on the side when each project is posted. (see image below)

Design of the recent post display

So in my sass file i have ready the code like:

.green-bg{
  background-color: #659E80;
}

.mustard-bg{
  background-color: #E3A44C;
}

.blue-bg{
  background-color: #2B7BBF;
}

i want taxonomy select to be display in the class of the div side-line. for example:

<div class="side-line blue-bg"></div>

I want this to be dynamic and using magic tags like:

<div class="side-line 
[each colour]
{@programme.colour}
[\each]
bg"></div>

This syntax is invalid. It is just a example of what I want to achieve. Also another note is the template is Pod Referencing Project pod.

Pods Template for Recent Projects:

div class="recent-post-container">
    <div class="side-line"></div>
    <div class="post-group">
        <p class="recent-post-title">{@post_title}</p>
        <p class="recent-post-programme">{@programme}</p>
    </div>

</div>

Please help! If you can solve this or find another way i can dynamically assign colors to the div based on the programme being displayed.

Upvotes: 0

Views: 1186

Answers (1)

Malak Reyadh
Malak Reyadh

Reputation: 1

Update. I manually put in the colors as a field with a relationship as type.

Upvotes: 0

Related Questions