Custom query for categories

Posted in: Newspaper
Post count: 1

Hi there,

I am using Advanced Custom Fields to add an additional, custom categorization field to my posts (called Topic). I would like for my users to be able to go to /category?topic=A to see posts that match the category and topic.

What’s the best way to modify the posts query being used in the category template? I’ve seen in ACF support that it’s relatively straight-forward using a custom query, however I need to pipe those posts into the actual category template page.

Any advice is appreciated!

Post count: 22421

Hi,

This will have to be made custom by a developer as there is no way from the them settings or from the them code to make this happen. You will have to create custom functions to call the acf on the category pages.
Try this topic from the wp forums https://wordpress.org/support/topic/list-posts-by-key?replies=22#post-385388 and try to replicate the code in the category files if you have the proper coding skills. Posts are handled by the loop.php file.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.