Forums Forums Search & Filter Pro ACF posts not displaying

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Trevor
    #246000

    Are you able to send me a live link/URL to your search page so I can take a look?

    In selecting the Meta Key name, note a ‘gotcha’ with ACF ….

    … it makes 3 meta keys per field, like this (in this example for a field named ‘land’):

    #1 _land
    #2 field_52f0fc4334f52
    #3 land

    In our Meta Key selection list, you need to use key #3, without the underscore at the start of the key name. If you choose #1 by mistake, in the field choices you will see the name of #2.

    Anonymous
    #246091

    Hi, Trevor thank you for your reply. Ah. I did not see that.

    I have changed the filter to the non-underscore option and its still not showing. Looking at the page source, the loop fails to load and everything below it is just blank in the source code.

    The site is only working locally at the moment so unable to share a link.

    Is there a way of using the non-custom page template and just the standard loop with ACF content?

    Lee

    Trevor
    #246296

    If you want ACF fields to display in the results, you will need to code it. I cannot see any obvious errors in your code, but you need to follow standard debugging methods to find where it is failing. One thing I see that you are not doing is to test for the existence of the variable before using it.

    The method I would use is to reduce the code to a much smaller amount, thus not outputting a lot, test it, add a bit in, test it, and so on.

    It will not be our plugin causing this though, it will be your code.

    Anonymous
    #246378

    Fixed! It was where I was copying your support code and my loop was named slightly different. $query vs $the_query

    Trevor
    #246385

    Thanks for letting me know. I will close this thread for now.

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