• Creator
    Topic
  • #8555

    steven wilson
    Spectator
    Been thanked: 0 times

    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?

Viewing 10 replies - 1 through 10 (of 10 total)
Replies
  • Alok Maheshwari
    Spectator
    Post count: 303
    Been thanked: 0 times
    #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
    Post count: 22
    Been thanked: 0 times
    #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
    Post count: 303
    Been thanked: 0 times
    #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
    Post count: 22
    Been thanked: 0 times
    #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
    Post count: 303
    Been thanked: 0 times
    #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
    Keymaster
    Post count: 2538
    Been thanked: 29 times
    #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
    Post count: 22
    Been thanked: 0 times
    #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
    Post count: 303
    Been thanked: 0 times
    #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
    Post count: 22
    Been thanked: 0 times
    #10293 |

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

    steven wilson
    Spectator
    Post count: 22
    Been thanked: 0 times
    #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.

Viewing 10 replies - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.