hello all, I have a custom post type called “services”. I want to use a card for each service on my home page populated with the title + image of each service custom post type.
How do I set up functions to grab the custom fields from an individual “Service” custom post and display it on my homepage?
I have the following Services within the CPT:
Design
Development
Optimization
Content Creation
Thank you for any help!
You need to create a new query on your CTP https://developer.wordpress.org/reference/classes/wp_query/
Then you loop over the results of the query, example is shown on that page as well, and show the fields from each post returned by your query.