How to design a table based on css values set from admin/dashboard


I have created a table at Single Product Page via plugin.
I want to change the color, border, bg-color etc.. according to the values that the admin will set/enter from dashboard.

I have done the following so far.

From the following form (attached image), the admin will choose the css values for table body, header etc.And after hitting the save button, all those css values will be saved inin wp_options as key value pair.

For Example

'table_background_color' => '#ff5'

What I want

I don’t want to get the wp_option and then apply that css design value for particular element of the table, because I have huge form containing a lot of css design values and applying css inline is kind of messy.

I’m looking for some nice approach to apply those css values (which I have saved in wp_options) to the table.

How can I apply those saved css values from a separate file ?
Any help/recommendation will be highly appreciated, thanks.

enter image description here

, , wp_learner 1 year 2020-07-27T06:13:20-05:00 0 Answers 49 views 0

Leave an answer