• Resolved Marlimant

    (@marlimant)


    Hi: It’s possible search only the data in specific custom field?
    I’m using ACF plugin with Elementor free.
    I leave the field “Available post types” empty, (in General options >> Sources & Basics >> Search in custom post types).
    Then, I typed my custom field name in “..or search in selected custom fields?”
    But there is not search results. Only works when I drag the frame “Posts” in “Search in custom post types”. But done that, the plugin search all content in post, and I need the plugin only search in certain Advanced Custom Field.

    I noted that my custom field is not visible in the post or page code.
    This plugin can find a custom field that is not visible in the page code? (I’m using elementor free with theme Hello Elementor).
    Thank you.

    • This topic was modified 3 years, 3 months ago by Marlimant.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    Custom fields are items, which are assigned to a custom post type. If the plugin was to return the custom fields, from the custom fields database, they would lead to nowhere, as they only exist with custom post types.

    If you typed in the field name into the “Search in selected custom fields” option, and nothing came up, then it is either not a custom field, or it not had been used before. Once a field is used by a custom post type, it is stored in the post metadata table, and our plugin can also list it there.
    It does not matter if the field is visible or not, the plugin uses the database for search, where the fields are stored regardless of the visibility.

    Best,
    Ernest M.

    Thread Starter Marlimant

    (@marlimant)

    Thanks for so detailed reply.

    All checked but without results.
    The only results I get when try to filter any post type different to “Posts” (in “Search in custom post types”), is dragging the “wpcf7_contact_form” to the “post types you want to use!”. In that case the search display a complete list of every contact form 7 custom type (every link to a page without contents).

    When I drag “Fields” and “Field Groups” post types and I search by the name of my custom type, and I get a results linked to that custom field (to a page without content).

    The only way the plugin works well is dragging the “Posts” to the post types you want to use, but with that action, I losting any possibility to exclude any content in post.

    Greetings,
    Javier.

    Plugin Author wpdreams

    (@wpdreams)

    Hi Javier,

    May I ask what post types you want to display as results? Are those posts or pages or something else?

    Thread Starter Marlimant

    (@marlimant)

    Sure, I’m using Posts as post types.
    Here you can see examples of my settings.
    SETTINGS

    Plugin Author wpdreams

    (@wpdreams)

    Thank you!

    The issue is with the selected custom post types. You only need the “Post” post type there: https://i.imgur.com/lfOYb9B.png
    The rest looks all right. This way the plugin will return the posts based on the region custom field.

    Thread Starter Marlimant

    (@marlimant)

    Thank you so much for your time. Now works great.
    My confusion was because every posts was categorized, and the plugin was search there too.
    Your asessory let me found out that, and switching off the “Search in terms? (categories, tags)” and achieve a clean search.

    Greetings;
    Javier.

    Plugin Author wpdreams

    (@wpdreams)

    You are welcome Javier ??

    I will mark this as resolved then. Feel free to rate the plugin if you like it, it is greatly appreciated.

    Best,
    Ernest M.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search only in specific ACF’ is closed to new replies.