• Resolved justinios

    (@justinios)


    I have added a custom filter to one of my custom post types. When I filter the results, all the columns set by ACF QuickEdit disappear in the list and it only shows the default “title”, “date” and “published” columns. How do I get all my columns back in the filtered results?

Viewing 1 replies (of 1 total)
  • Thread Starter justinios

    (@justinios)

    UPDATE (2021-12-19 02:58):
    Because I couldn’t get the columns or the Quick Edit fields to show up when filtering results using the “pre_get_posts” hook, I added all the columns and quick-edit fields myself. I got everything working and then when I filtered results, my quick edit fields didn’t show up and some column values that relied on the “acf” functions like “get_fields” didn’t work. I googled and found this post (https://support.advancedcustomfields.com/forums/topic/acf-and-pre_get_posts/) that had a check for “!$query->is_main_query()”. When I added that, all of a sudden, my columns and quick-edit-fields worked with filtered results. The check is added in the function used with the “pre_get_posts” hook. Once I added that check, I removed my custom columns and quick-edit fields and re-enabled the options in ACF Quick Edit Fields and everything worked. So it was an issue with my “pre_get_posts” function and now the plugin itself.

    Hope this helps someone.

    • This reply was modified 3 years, 3 months ago by justinios.
Viewing 1 replies (of 1 total)
  • The topic ‘Not working with custom filter (parse_query)’ is closed to new replies.