Home › Forums › General Issues › Help retrieving with ACF to define posts shown – Using a Shortcode › Reply To: Help retrieving with ACF to define posts shown – Using a Shortcode
Hi John
Is there another way I can demo this to test the fields? I also can’t see a reason the fields would not work.
The code works 100% when the ACF parameters are not set – I can use the shortcode with the custom post type specified and it returns the correct information just fine.
[list-posts type="company_directory" posts_per_page="40" posts="40"]
This displays all the posts of the type company directory.
I just then wanted to query what is shown based on the field option within that post type?
I based this code from an article online about creating flexible shortcodes in WordPress.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.