Forums Forums Search & Filter Pro Anyway to include tags of attachment into the query?

Tagged: , , , ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #196873

    I’ve got an ACF image field. Any way I can use the tags in this field as a filter?

    $image = get_field('72dpi_image');

    I tried to use the field as a Post Meta filter but it’s not showing up, nor do the tags show up only a field is there.

    null

    What I’m trying to do is use the tags of the image as a filter.

    Trevor
    #196886
    Anonymous
    #196890

    Hi Trevor,

    Thanks for the tip, now the filter is showing the posts with that image, I would rather want it to filter posts based on the tags of that acf field

    Trevor
    #196894

    That would require drilling through to fetch those attached terms, and this is not something Search and Filter does. Search and Filter will only find the image in this case. Sorry.

    Anonymous
    #197073

    Thanks I seem to have gotten close to the solution, one more question. is there anyway to rerun the query of searchandfilter with the current filters selected?

    Trevor
    #197077

    How do you mean, re-run? Perhaps you could describe what you have in mind in more detail?

    Anonymous
    #197106

    Basically, I’ve added my own query filter on top of searchandfilter, I would like to modify the query to show more results if my filter is selected.

    <strong>$query->set("posts_per_page", 50)</strong>; 
    
    if ($query->have_posts()) {
    ...
    Trevor
    #197146

    I can see what you are trying to do, but adding your own field or function to the form is not supported in this version of Search and Filter. I believe it may be supported in V3.

    Anonymous
    #197244

    Thanks for the info Trevor, I have another question.

    Is there anyway to generate a link that will query through the posts to only show a specific post?

    Trevor
    #197262

    I am not sure that I understand you. How do you envisage it would function? In general terms, I suspect the answer is probably not.

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