Fetching items based on categories name from CPT-UI struggle #3117
avivperets26
started this conversation in
Advanced Custom Fields
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'm building my app in Next.js and WordPress using WPGraphQL,
what I'm trying to achieve is fetching a query based on pagination (which I managed to make work) and based on the categoryTags,
if no categoryTags provided in the condition it will retrieve all the items,
if one categoryTags provided it will retrieve all products with the same category
if 2 or more categoryTags provided only product with those categoryTags will retrieve
I made Advanced Costume Field Product posts and Custom Post Type UI Taxonomies type of CategoryTag.
however, I couldn't find how to implement it well till now (almost a week that I'm trying)
I tried few functions inside my functions.php but none of them helped so I deleted them...
the last one was
to share with you the structure of my query without filtering by category only by pagination:
and the results :
I found myself lost inside the documentation and i couldn't find an answer till now on how to solve it,
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions