I am writing a plugin to display information from the database. There is a function:
function show_list_oil_filters($content) { global $wpdb; $excel_out = $wpdb->prefix.excel_out; $results = $wpdb->get_results("SELECT DISTINCT `Brand` FROM $excel_out"); foreach ($results as $marca) { echo do_shortcode("[filteroption val='".$marca->Brand."']"); } return $content;} This function selects and displays the result of the shortcode on a static page.
Shortcode code:
function filteroption_func_handler_oil_filters($att) { /*Для примера*/ return "<option value='" . $att['val'] . "'> Received attribute: " . $att['val'] . "</option>";} Information is displayed on the static page, but not in the right place.
How to display the received information in the right place in the <select></select> on a static page?