[Resolved] Is it possible to change color of a numerical output if the result is negative?
This support ticket is created 9 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Thanks very much for this. Unfortunately, the modified code seems to create an issue for the theme I'm using (Pagelines DMS): the front end page editor will not allow the page to load.
I've tried deactivating all plugins (except Toolset) and get the same result. I've tried on a couple of sites using Pagelines DMS and it happened on both of them.
No sure if there's an alternative approach, but, nevertheless, I really appreciate all of your help.
How would I go about adding a second evaluation (on the same site) that functions basically the same way but uses different thresholds to determine which text is output.
So basically what I'm hoping to be able to do is have two distinct evaluations done so that I can apply them separately.
I tried to figure something out on my own (I basically just copied/pasted part of the code from above and then modified it a little), but just caused the site to go blank.
Here's what I did (it should make it clear what I need to be able to do):
add_filter('compare_firstone_format_filter', 'compare_firstone_format_filter_func');
function compare_firstone_format_filter_func($v)
{
$res = 'A';
if($v<18)$res= 'B';
if($v>22)$res= 'C';
//here you can add more conditions
return $res;
}
add_filter('compare_secondone_format_filter', 'compare_secondone_format_filter_func');
function compare_secondone_format_filter_func($v)
{
$res = 'A';
if($v<14)$res= 'B';
if($v>21)$res= 'C';
//here you can add more conditions
return $res;
}
I realized that I haven't done a good job asking for help because I have a few support threads open that I realized cannot be resolved independent of one another so I decided to start a fresh thread that combines all them.
I really appreciate your excellent support and apologize for having taken up your time. I should have thought this through more fully before asking for assistance.