Home › Forums › Pro Support › More control over meta display
- This topic has 7 replies, 2 voices, and was last updated 2 years, 6 months ago by
elvin.
-
AuthorPosts
-
March 17, 2021 at 10:15 am #28164
Brian & Teresa
ParticipantFollowing up to a separate e-mail thread with Elvin, we are redesigning a site that is currently in a page builder. The client has accepted that if he cares about performance he must let some things go. I think we can do most of what is most important to him with our WPSP + GBP + GPP toolset, but one thing I don’t have sorted is meta display. Mostly I am talking about categories.
<b>Is there a way to make WPSP display only the primary category?</b> We need to be able to display the category meta with the post. However, almost every post has multiple categories assigned.
<b>Is there a way to control where the meta displays?</b> There aren’t any positioning settings in WPSP, other than below title/below post. I notice the Overlay card style has the title at the top and the meta at the bottom. This is close to what we need, if I could reverse the output order. Is there a magic code snippet that would help me accomplish that?
If you could help with the above, I *think* I could handle the rest of what we need to do with CSS. I can provide screenshots or URLs on request, but do not want to post them publicly.
March 17, 2021 at 4:36 pm #28186elvin
ModeratorHi there,
If Overlay is close enough to what you want to achieve, we can try playing around with it using CSS to achieve your preferred layout.
You can provide the screenshots or URLs on the e-mail thread. 🙂
March 20, 2021 at 6:19 am #28277Brian & Teresa
ParticipantThe client actually preferred the post display I’d set up in the first row, which didn’t use the cards at all. We still might use that style elsewhere. The question remains about how to show only the primary category.
Is there a way to make WPSP display only the primary category? We need to be able to display the category meta with the post. However, almost every post has multiple categories assigned. I’d prefer to remove it with a code snippet vs. hiding it with CSS, if that is an option.
March 21, 2021 at 6:43 pm #28299elvin
ModeratorThis is quite tricky to do. Please see my reply on your email. 🙂
March 22, 2021 at 2:22 pm #28362Brian & Teresa
ParticipantFor the record, below is Elvin’s e-mail reply.
March 22, 2021 at 6:16 pm #28381elvin
ModeratorThanks.
The forum is having issues posting my reply so I’ve sent it there. 🙂
Try this code:
https://gist.github.com/ejcabquina/e286adfa39f1e2aea21c37dd03ed993f
March 23, 2021 at 6:07 am #28405Brian & Teresa
ParticipantThank you, Elvin. I dropped the code into a Hook Element so it would only get loaded on a specific page, and it works perfectly.
March 23, 2021 at 9:31 pm #28426elvin
ModeratorNice one. Glad you got it sorted. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.