i use the “so-editor-widget” to display some text/image info within a sidebar on a WP website. the widget allows to set the TEXT COLOR by using the color picker.
i would like to set the TITLE color to the same color! since i can not do it manually, i have to program it. i located the database entry the editor widget wrote:
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (175, 'widget_sow-editor','.............');
in particular i see the HTML/CSS for the text color (within the db entry):
<span style="color: #ff6600;">...</span>
my question: where can i find the PHP file (i assume) that writes to and updates the database entry? there i would do my little extension for the TITLE COLOR – something like this:
(??) …
– something like this:
Hi Masus
Very sorry about the late reply. We work through a prioritized forum queue, and unfortunately it’s taken us some time to get to your thread.
https://siteorigin.com/about/forum-thread-prioritization/
Because it’s been a while since you posted this, would you mind letting us know if you still need help? If so, we’ll jump right in.
hi andrew
(sorry for my very late response – also from my part.)
yes, i still need help.
best regards,
masus.
hi andrew
meanwhile i figured out that it will not work by customizing the database entry.
a much better idea is to set the title color when rendering for html output.
so: i will (somehow) read the custom text color from the database and then
output it as follows:
my next steps will be: find out where exactly the widget title is rendered (what
php file, location within), and how i can read the color in the database and where
the can be found to insert the style (color).
if you still understand what i mean, you could still help me. :)
best regards,
masus.
Hi masus
Thanks for all the effort you’ve put in here. Before I hand this off to our Widgets Bundle developer, how many text colour cases are there. Is there no way we can prepare a set of CSS rules to set the title colour for you?
hi andrew
thanks for your answer! – the idea behind my question is: the website aministrator should be able to first place an image in the widget and then choose a text color matching the color palette of the image. this is already possible: the so-editor’s color picker is perfect for customizing the text color! – now, the ideal would be that also the title (, including borders!) appears in the frontend in the desired color, equal to the text color. – you are right: it would be okay if the user had a set of colors to choose from. about 16 basic colors like yellow / orange / red / pink / purple / blue / green etc. would be an acceptable approach.
maybe the best for me as a developer would be the possibility to grab that chosen color value, in order to attach the style definitions to the , i.e. for example: style=”color:#ff6600; border-color:#ff6600;”.
thank you, best regards,
masus.
Thanks for explaining. Let me see I can grab one of the guys tomorrow to try look into this. Unfortunately, due to our small size we struggle to assist with higher level developers questions. I’ll see what I can do tomorrow. Chat then. Thanks :)
hi andrew
no problem at all. i mean… i did not even expect that you deal with this subject so intensely!
i’d be very grateful if someone at SO knows a solution or can give me some hints. otherwise
i’ll continue trying to write some (php) code to achieve my aim.
thanks & best regards,
masus.
Hi masus
I had a chat with our Widgets Bundle developer, Braam. He let me know that the value from the colour picker would be inside the HTMl style inside the text we get from TinyMCE. It’s not an explicit value we can extract and do something with. I’m afraid we’re unable to assist further on this particular thread. Sorry, wish I had better news.
hi andrew
oh! … but thanks anyway! – and you know what? our dialogue was so inspiring for me that i found now a completely new approach to solve my problem! it is a bit of a workaround (but not a bad one!). i did not even have to alter SiteOrigin code (what i am never afraid of… but is, of course, a bit tricky when it comes to a plugin-update). so everything turned out all right. it works! i got inspired! i am happy! :)
best regards from switzerland,
masus.
Awesome :) Really glad to hear you went another route and made progress. Congrats!
All the best with your site.