Support

Account

Forum Replies Created

  • Hi John,

    Thank you very much for the code.

    Please accept my apology if my question is novice, as this is my first trial with ACF PRo.

    I have modified the code to contain the field names and wrapped it in php and put it in a page template where I want to show the grid, but when i refresh the page I get a blank screen.

    Do I need to add more code than the php wrap to get it to work?

    I have done the test of adding a simple the_field function to test that the template is able to read ACF.
    When I did so, the page returned the id number of the category and tag that i specified, so it is able to read ACF.

    I appreciate your help.

    Thanks

  • Hi John,

    Thank you very much for your reply.

    Sorry if my question was not clear enough.

    I am not after a “front end” functionality.

    I am trying to use the “advanced example in this tutorial but in a different way:

    https://www.advancedcustomfields.com/resources/query-posts-custom-fields/

    In this example, the function searches for posts that have custom fields populated with “red” and “orange”, and returns an array of them.

    This will be fine for a small scale, but i am trying to replace more that 400 grids. this means 400 function like this.

    I already achieved putting 2 multi select taxonomy ACFs. one for categories and one for tags.

    What I am trying to to is to alter the function in the tutorial to say:

    – inspect the taxonomy IDs in the 2 fields of the post i am editing
    – query the database based on these taxonomy IDs
    – return an array.

    That way, i have only one function, and change the values per post, and get the corresponding array.

    then we worry about how to show them as a grid.

    Please advise if you need more information.

    Very much appreciated.

Viewing 2 posts - 1 through 2 (of 2 total)