Custom Fileds
-
Hi community,
I am coding a theme and within that process a problem occured. Therefore I would like to know if/how it is possible to fix it. My problem is related to custom fields.I need:
I need the custom fields organized in pairs. The first part of the pair will be the date and the second part will be the state. State can be 0, 1 or 2 the date is quite simple. The result might be like that:post #1 / 1.1.2020/ State: 0 post #2 / 2.1.2020/ State: 1 post #3 / 3.1.2020/ State: 1 post #4 / 3.1.2020/ State: 2 post #5 / 5.1.2020/ State: 0 post #6 / 6.1.2020/ State: 2 post #7 / 7.1.2020/ State: 0 ...
Then I want to create a loop and ask for displaying a list of all posts in a given period. e.g: list all posts between 3.1.2020 and 5.1.2020 The posts should have different classes according to their state. So the output could look like:
<div id="post3 class="state1">...</div> <div id="post4 class="state2">...</div> <div id="post5 class="state0">...</div>
I suppose it is possible, but I do not know how to group the custom filds in the right way. Maybe somebody could give me a hint. Using a plugin such as ACF is OK, if necesairy.
Thanks
Raphael
- The topic ‘Custom Fileds’ is closed to new replies.