Home Forums Pre-purchase Questions Using ACF to insert and fetch data from Database


Using ACF to insert and fetch data from Database

  • Greetings.

    I was wondering if it was possible to use ACF and its forms to insert/fetch data from my WordPress database.

    My main issue with ACF is the fact it seems to be heavily tied to the Posts of WP, and that One field = One value. Considering i have to work with a lot of datas and values, having thousands of articles stocking the fields and their respective values isn’t an option.

    Is there a way, using ACF to say, stock 100 values under a “Name” category in the database for example ? Without using posts and such ?

    Thank you.

    Note: To clarify a bit

    I’m working on an interactive map that will generate markers based on the GPS coordinates stocked in my database. Each coordinates equals an object which have a name, coordinates, a description and various others info dumps.

  • The answer is, not easily.

    ACF will store the values related to each post.

    There are various actions and filters. For example acf/save_post and acf/update_value.

    You could use these actions and filters to store data in a custom table by creating custom queries using $wpdb.

    Example here.

  • I dont think this is exactly what you looking for but have a look.

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

You must be logged in to reply to this topic.