• Hello,

    Hopefully, I can explain what I’m trying to do clearly. I want to create a custom theme that allows someone who purchases it to change the category of a WP_Query. This would be a blog theme and the WP_Query would show posts from a certain category.

    So for example, I create the theme and there’s a WP_Query for the category ‘business'(created in ACF). When the customer purchases the theme, I want them to be able to change that category(using ACF) from ‘business’ to ‘fishing’ for example so that it fits their business blog.

    Can anyone point me in the right direction to learn how to do this?

    TIA

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I’m unclear why you’d use ACF to specify a category term when there is built-in functionality to do so. Post authors are free to specify whatever category terms they like, you needn’t pre-specify any if they are intended to be changed anyway. Category terms can be added and removed at will by anyone with adequate role capability.

    Then anyone can request posts assigned a particular category term with something like example.com/category/fishing/. WP will then query for posts assigned the “fishing” term on its own, you needn’t do anything special.

Viewing 1 replies (of 1 total)
  • The topic ‘WP_Query using ACF fields’ is closed to new replies.