How can I make list of multiple addable options in admin page?
-
Hello,
I need to make an availability to add goods and reviews through admin options page.
That is the problem:
I have made a some what like landing page. So there about 10 goods (materials – sand, stones and etc.). It is not a shop. There can not be many such items. But the count is not very small. The user may want to put 15 or 20 items on page.
So the problem is that I have made a template. So I can not add a plugin as woo commerce. It would be the template for shop.
But my theme is not a shop. It is a landing page. It will be big overweight to add woocommerce.
So what I need?
I need to add a list through an admin page.
I have made it.
It is 10 items there.
But I want the user to be able to press button “plus” in admin and then any number of items can be added. One by one.
But the very problem is that:
How will I get this fields(options) and items, which they belong to, if I the user deleted one and then added another. There will be in database table “options” such picture:
option_review1_photo
option_review2_photo
option_review205_photo
option_review132_photoSo the usual function get_option – will not be able to be used cause I do not know what index to write.
Do I have to write the statement to the database by myself – SELECT LIKE?
Or there exists a better way to do it?——–
Grigory Smirnov
- The topic ‘How can I make list of multiple addable options in admin page?’ is closed to new replies.