Hi,
I am trying to get the id’s of all featured listings from somewhere and im not sure how to do it.
I have a few options if you can advise which would be your suggested one to use.
In this example i am using a post carousel to display the listings. it is a WPbakery element. I want to so the same thing with just an image slider and some other elements so it is the facility to get just featured listings that interests me.
In the options for this element i can specify the post type i want to display and my geodirectory cpt is there. This then displays all of the listings. there is obviously not a limit to featured option as the post carousel doesnt know the capabilities of each CPT.
I can filter the posts that are shown by tags and categories. however the featured listings again dont have any specific tag or category.
I can add in a list of id’s to include but this would be a manual process each time a featured listing is added or removed.
I have a plugin which allows replacement of values within the shortcode. so for example i could replace the list of ID’s to include with the results from a filter output or an action output.
the other option is for me to just use the gdlisting shortcode with featured only set but this would mean i have to style the output to hide a lot of stuff as they all use the same archive item layout.
So the question is..
is there a filter or hook which will return a list of ID’s for featured listings.
Is there a way to tag listings as featured or add them to a featured category automatically when they become featured and rmeove them when they are removed.
Is there another smart way to get a list of just featured listings into a wpbakery element in order to display these in different ways.
Or is there some other output i can use to get the list of featured listings as objects which i can use in an element not specifically designed to be used with GD.
I know this is quite a tall ask but i really want to show my featured listings throughout my site and make them pretty….
Thanks in advance for your feedback.