What methods of storing settings iega best (css for the most part)?

Until I see such a solution
generate css from inputof and jab in one line in database and how such a decision adequately?
maybe there are some more practical things for this, how is this done normally ?

ps
The page can be N blocks, each block your settings 5-10 properties and maybe something else in the future. How would the query not to spawn and not to inflate the base. + with a focus on this.

5cfc8cf2744f7429013742.png
March 23rd 20 at 19:42
2 answers
March 23rd 20 at 19:44
I would use user_meta and json for storage (instead of the usual strings). With json_decode and json_encode business will have with a normal associative array.
March 23rd 20 at 19:46
For user settings there is a user_meta. There and put.
I would maintain clean properties and not html
To clean properties it is a lot of queries will be say 30 units 5-10 units (150-300) 1 page. of course the value on the record is not continuous, but the reading will be constant.
+ interval overwrite properties + number of queries on the page itself with redis (100+-)

Maybe over nothing so over-thinking it. - gudrun23 commented on March 23rd 20 at 19:49
the request will be only 1
and that will be cached - Maynard_Shanahan12 commented on March 23rd 20 at 19:52
@Maynard_Shanahan12, 5cfd287cd8096859240702.png
Maybe I don't understand something - gudrun23 commented on March 23rd 20 at 19:55
@Maynard_Shanahan12, If there is one page with a bunch of fields, then on the one, but when the page on which is displayed a repeatable group of fields via the cycle that each group is a separate query. In any case, the query monitor is not ambiguous it shows. - gudrun23 commented on March 23rd 20 at 19:58
@gudrun23, well, maybe you are there cache turned off or some kind of custom fields get

here's how it should work out of the box
https://wordpress.stackexchange.com/a/177849 - Maynard_Shanahan12 commented on March 23rd 20 at 20:01
@Maynard_Shanahan12rather the second, apparently the logic of this plugin. or is there another not done.
the structure of the post is this:
Page
Custom field
—A group of repeatable fields
--Field
--Field
--Field and so on.
Custom field

Perhaps the queries are like this:
Page (request 1)
Custom field (metadata from query 1)
—A group of repeated fields(2)
--Field (meta z-C2)
--Field (meta z-C2)
--Field and so on. (meta z-C2)
—A group of repeated fields(query 3)
--Field (meta h-C3)
--Field (meta h-C3)
--Field and so on. (meta h-C3)
and so on.

According to your link, apparently this is the case
In the worst case you call get_post_meta separate the IDs of posts that have not been obtained previously WordPress. In this case, each call to get_post_meta will lead to a single query.

Perhaps each group of fields as a separate record + some more queries associated with it - gudrun23 commented on March 23rd 20 at 20:04
@gudrun23, without the code to guess a little help.

but if
it is one page is_singular(),
there's a standard loop,
all custom fields belong to her,
all requests will be from the cache - Maynard_Shanahan12 commented on March 23rd 20 at 20:07

Find more questions by tags WordPressCSSMySQL