WordPress.org

Ready to get started?Download WordPress

Forums

Possible to change recurring text color via MySQL? (4 posts)

  1. ladyfriar
    Member
    Posted 1 year ago #

    First of all, I have very little familiarity with mySQL. The question I'm asking could be totally out to lunch. Please be gentle!

    I'm using the Montezuma theme. The accent color throughout the theme is blue, and it's annoying to have to wade through every CSS file to change it. I figure there must be a way to change all the code at once. No?

    I recently discovered the REPLACE query in mySQL. I used it to change links. Does it not follow that you could somehow use this same query to change one color code to another, throughout the whole theme? I would like to change all text with the color code #0090d3 to #0a6127.

    If anyone can help I would greatly appreciate it!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    No, CSS files are not in the database. You could, conceivably use a text editor (offline on your local machine) to do a find/replace to change all the text colors, but you'd still have to do any and all stylesheets and then upload the new versions to the site using FTP. Usually not worth it. Often, you can modify the CSS quite efficiently using selectors, but specifics would depend on your theme, site and what you are trying to do.

    P.S. Be a bit cautious using REPLACE in the DB -- you can get into a big mess doing that :)!

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Also, themes often have built in options for things like color -- not sure if that's relevant to yours, but you might double check.

  4. ladyfriar
    Member
    Posted 1 year ago #

    Thankyou so much, WPyogi. I really appreciate your help.
    I can finally stop whining and just change the code myself. (:

    Also, thanks for the caution. I already had to start from scratch once because I got trigger-happy with the replace function.

Topic Closed

This topic has been closed to new replies.

About this Topic