what i am trying to do is create drop down menu in theme customizer from custom db i have created. db name “students”. in the db i have only the id and the name. i want to show all students names in the drop down menu. and when the user will choose some of the students name and will click on the save button (i need to save his choose), and i want that next time the same name will be selected. in this drop down menu.
i tried to make this work but without any results.
thanks for help
Assuming that you mean that
students
is a table within your WP database, this should get you started.I’d recommend a read of the following materials, which are pretty useful –
Here is the code to add the dorpdown box –
here is the code i am tring to make it work.
1. here i am tring to pull out the selected opsion. but this not working. evry time the user choose some student name and click the save button the selected opsion returns to be default opsion.
2. i have create class to insert this drop down menu to Theme Customizer section but it not working and i get php error.
what i do wrong?
Thanks for help!