Conditional display of post metafields
-
This plugin could be about to save the day! I’ve been searching for a way to show a filtered list of posts, for a category for example, but have some of the posts “decorated” in the UI, depending on presence of some data associated with the post.
For example, the category might have 20 posts. They are all displayed with the same format (perhaps the featured image, title and a link, etc) but for SOME of these posts, flagged in some way, I want to display a little indicator.
Providing it’s easy to manage, I am pretty open as to how I specify which posts are to have this visual indicator, but thinking that just applying a tag to the post should do the trick.
So, with this in mind, I have two
. Retrieve the query, including the field that indicates whether they are to be flagged.
. Display the posts in some form, with the little visual indicator displayed conditional on whether the flag exists.
. For extra points, I’d really like to be able to use some form of designer, such as the Elementor posts widget, to design the presentation, but that might be a stretch.
I’m thinking this plugin can go a long way towards helping me here, but before I get stuck into it in detail just want to make sure I am not going down a dark alley! Is this generally looking pretty feasible?
PS: I am an “occasional” programmer and can add to a custom plugin I maintain. My biggest weakness is in the presentation layer, particularly CSS and ensuring a responsive UI, hence my desire to use something like Elementor, if possible.
The topic ‘Conditional display of post metafields’ is closed to new replies.