-
We want to show a career progression on an employee profile page. SO:
Employee 1
position 1
position 2
position 3Employee 2
position 1
position 2
position 3
position 4
position 5I have created a CPT “Profile” with appropriate fields. I am guessing it would be a Query Loop.
Issues are these:
1 – Number of positions varies as illustrated above. So we only want the information available to be visible.
2 – Would like to separate the “Positions” with arrows of some sort illustrating the “Path” this employee took.Any help/thoughts/suggestions would be appreciated.
Thank you! -
Hi there,
1. Is each position a custom field?
If so, you can tick the Required to render option when you create the dynamic tag, if the field does not have a value, then the entire text block will not show.
2. Can you show me a mockup of what you want to achieve?
-
#1 – Yes they are. The field names are the following (which I do not know if I should set up a different way) -> first_position, second_position, third_position, fourth_position, fifth_position, current_position
#1a – Not quite sure where I tick that box?
#2 – The “mock-up” is pretty simple (famous last words LOL):
a) A query loop loop would cycle through Employee Profiles
b) Within Profile another query Loop would be nested showing the Positions (1 thru current) for the particular profile
c) They would appear in linear fashion (inline?) with a graphical spacer in-between (and right-pointing arrow or triangle:Position 1 > Position 2 > Position 3 > Position x > Current Position
Hope this helps!
-
1. Please check this doc, it has a screenshot shows where the option is:
https://learn.generatepress.com/blocks/block-guide/getting-started-generateblocks/dynamic-tags/#3-1-required-to-render2. I don’t think you can use query block for the positions, aren’t they just post meta and separated post meta? You can add one text block in the query block to pull one custom field, if there are 5 position fields in total, then you can add 5 text blocks to pull the 5 fields’ values.
With the >, you can set the dynamic tag for:
– postition 1:{{post_meta key:first_position}}
– postition 2:> {{post_meta key:second_position}}
– postition 3:> {{post_meta key:third_position}}
– etc -
Ying,
Thanks for the feedback. I seem to be stuck on Step one. What Element do I need to add to my page to make the Dynamic Data icon even appear? I tried the Generate Blocks Headline and then the Custom HTML. I can’t get the icon to appear and the help pages dopes list the elements that make it appear.
Unless I am absolutely not understanding the concept.
-
It seems you are still using v1 blocks, can you go to generateblocks > settings and toggle off the v1 option?
Then all the NEW GB blocks you add will be v2, and you should be able to use the dynamic tag.
-
See below…
I just saw your new response. I will go follow it.
-
Let me know if that works!
-
Yes! Took me a while (clear caches/history and such) – but finally appeared -> like magic! LOL
I will let you know how thing proceed. Will leave open as may have more questions.
Thanks!
-
How can I post dynamic tags inline as opposed to stacked?
Position 1 > Position 2 > and so on?
-
You can wrap the text blocks with a container, set the text blocks’
displaytoinline-block. -
I figured that out (FLEX)
-
Glad to hear that 🙂
-
Right now I have them in a flex container as 5 headline elements.
Is there a way to combine them in one element and use a built-in separator?
I am confused because if I put in a css separator – wouldn’t it render a separator even for the elements that do not render?
-
Is there a way to combine them in one element and use a built-in separator?
No. It won’t work, as some of the post meta is empty.
I am confused because if I put in a css separator
What do you mean by CSS separator?
-
I read that i can add separators through CSS – but have not tried it.
I should probably ask what the best way to add separators is at this point.
- You must be logged in to reply to this topic.