In a WP_List_Table example I'm using, I am seeing how to make a general query to the wp_options
table in the Wordpress database.
For example, $query = "SELECT * FROM $wpdb->options";
I also see that we typically create a foreach
loop to display all the records in this table on separate rows. Sounds easy enough.
But I would like to filter this query to reference an "options array" instead. This is a single value in my table. For example, I want to query a single option called testimonial_settings
and then retrieve all the array values from this single field. I can't wrap my head around how I would do this using a foreach
loop.
Maybe a simple example showing the proper syntax would help clear things up....?