Let's say I have a database table wp_myplugin_cars
that looks like this:
id name color make
-- ---- ----- ----
1 Peter Red Ford
2 Jo Blue Nissan
3 Brian Silver Toyota
... plus n more rows
Let's say I have a plugin setting field which is a wp_editor
and inside that, the user can choose how to display their data using my plugin. They might save something like:
<h1>Cars and people list</h1>
[myplugin-name] drives a [myplugin-color] [myplugin-make]
My problem is that (with my current knowledge), I can only output:
Cars and people list
Peter drives a Red Ford
So my question is: when adding shortcodes, how can I "move to the next row" just like the Next Record
field in Microsoft Word mail merge. I.e., is the following possible?
<h1>Cars and people list</h1>
[myplugin-name] drives a [myplugin-color] [myplugin-make] [myplugin-NEXTRECORD]
The desired result being:
Cars and people list
Peter drives a Red Ford
Jo drives a Blue Nissan
Brian drives a Silver Toyota
... and so on...