[resolved] Code gets changed automatically in a sidebar after saving (5 posts)

  1. viltnieks
    Posted 6 years ago #


    I wanted to make part of a text in sidebar stand out (different color) so I tried adding : <span style="color:#00b0f5;">text</span> and save, but after saving WP has made some changes automatically <span style= \"color:#00b0f5; \"> I can't use H tag at this time.

    WHat could be the problem ?

  2. Pierreb
    Posted 6 years ago #

    I assume you're editing the sidebar inside of the theme-editor in WP-admin? If so, try edit it in a text editor and upload it manually by ftp.

  3. viltnieks
    Posted 6 years ago #

    Yes I tried to do that in WP-admin.

    Which file should I edit ?


    If I use this code <span style=color:#00b0f5;>text</span> which is wrong, strangely enough it works.

    Also if I'd change class="regular-text" to class="html" would It change something ?

  4. Pierreb
    Posted 6 years ago #

    I'm not really sure if you're editing a sidebar widget (text widget etc.) or if you're editing the theme (under Appearance/Editor)?

    If you want the text to be static (if you don't need to change it all over) you could make your changes in the theme files. Edit the sidebar.php file in your theme folder. But in that case I would rather use CSS code to modify the sidebar. ex.

    in your CSS file:

    #sidebar span {
    color: #00b0f5;

  5. viltnieks
    Posted 6 years ago #

    Thank you, will try that ! :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.