• Closed
  • steven wilson
    Spectator
    July 27, 2014 at 11:38 pm #8555

    When I enter custom CSS into the theme options, all child selector symbols > gets converted to > when I save the options, which then causes the CSS I’ve entered to not work. I tested this by entering the custom CSS into style.css (which is not the ideal place to put custom CSS with a theme that supports custom CSS within the theme options) and the intended result worked. Can you explain why > gets converted to > and if there’s a work around? is there somewhere I can directly enter custom CSS instead of the theme options panel?

    Alok Maheshwari
    Spectator
    Posts: 303
    July 28, 2014 at 12:38 am #10271

    Can you please provide a screenshot and your site link so that I can have a look as it isn’t exactly clear what the issue is.

    steven wilson
    Spectator
    Posts: 22
    July 28, 2014 at 4:56 am #10273

    sorry, I just saw what happened when my post went through. my original problem is that the > symbol gets converted to its ‘code’ version which is & g t ; (without the spaces in between). when I posted my question, each time I wrote the code version it got converted to the > symbol. sorry for the confusion.

    Alok Maheshwari
    Spectator
    Posts: 303
    July 28, 2014 at 7:16 pm #10274

    Trying pasting the code here using the code shortcode or you can also post the code at http://pastebin.com/ and provide the link here so that I can see the code.

    steven wilson
    Spectator
    Posts: 22
    July 29, 2014 at 2:54 am #10278

    it’s not the code that’s the problem. the code works, which I proved by adding it to style.css. however, that’s not where custom css should go since that file will be over-written when the theme is updated. so I use the ‘custom css’ area of the theme options. but that’s what is converting the > symbol to its ‘code’ version which is & g t ; and which then isn’t working on the front end of the site.

    I can’t type the code version without the spaces because this forum’s back end will convert it to a > symbol as we saw in my OP.

    So I need to know two things: why is the theme converting the > to its code version, and where can I enter custom CSS manually that will not get over-written when the theme gets updated? Also, are you an admin or just a helpful user?

    Alok Maheshwari
    Spectator
    Posts: 303
    July 29, 2014 at 3:51 am #10280

    Just a helpful user for time-being. I have tested it on the theme and you are correct. Need Roman to have a look and fix it.

    Roman
    Spectator
    Posts: 3147
    July 29, 2014 at 7:55 pm #10286

    this issue happens, because of the sanitization of the field for the security reason, as per WP default codex. I can provide you a hack, which will allow you adding the symbol and get it worked, but you will need to update it manually after new theme release, or create a child theme for that. Edit this file in library/functions/options-sanitize.php line # 11

    Code:
    $output = wp_kses( $input, $allowedposttags);

    change to

    Code:
    $output = strip_tags( $input, $allowedposttags);
    steven wilson
    Spectator
    Posts: 22
    July 29, 2014 at 8:20 pm #10287

    thanks! I wonder if there’s a way to enter custom CSS manually through a separate file? in other themes I’ve used, there was a file called user.css which was not affected by theme updates and which allowed me to enter custom CSS through a text file. Is there a way to do this with evolve?

    I suppose style.css will be overwritten by theme updates and therefore is the wrong place for me to put custom CSS, correct?

    Alok Maheshwari
    Spectator
    Posts: 303
    July 29, 2014 at 8:54 pm #10289

    If you use jetpack, then you can enable the “Custom CSS module”. Further details at http://jetpack.me/support/custom-css/

    steven wilson
    Spectator
    Posts: 22
    July 30, 2014 at 2:18 am #10293

    I know jetpack but I’d like the dev to comment on its use. Roman?

    steven wilson
    Spectator
    Posts: 22
    July 30, 2014 at 2:20 am #10294

    ultimately I’d prefer a solution where I can update a txt file using ftp rather than a text entry area like the theme custom css and jetpack provides.