How To Remove span style="color: #ffffff from hundreds of WP posts

5 replies
  • WEB DESIGN
  • |
Just imported the content for a site rebuild that has hundreds of posts and pages.
The site used to be dark so they went in at the post and page level and set all text to white like in the example below:

<span style="color: #ffffff;"><strong>What is it?</strong> Some page text here.</span>

Obviously I do not want to waste resources changing each page manually. I want the text color to default to theme norms. Any suggestions appreciated.
##ffffff #hundreds #posts #remove span stylecolor
  • Profile picture of the author nmwf
    Signature
    Write comprehensible articles on *any* topic in seconds with First Draft...
    First Draft's: Download | Add-Ons | Templates | Purchase | Support | Affiliates
    {{ DiscussionBoard.errors[10224720].message }}
    • Profile picture of the author Peter Lessard
      Originally Posted by nmwf View Post

      Thanks. I have no issue using MySQL was curious if there was a plugin that dealt specifically with text format but logically that little voice in the back of my head was telling me no matter how you slice it your doing a find and replace on your database and probably should not let your assistants anywhere near that feature lol
      Signature
      Ready to generate the next million in sales? The Next Million Agency
      {{ DiscussionBoard.errors[10224960].message }}
  • Profile picture of the author nmwf
    Well, if there are plugins available. The reason why I didn't recommend any is because they didn't work the way I needed them to (wildcards, etc.). If all you need is a simple search and replace function, you can find a tool at the WordPress plugin site.

    I can't believe that feature isn't already coded into WordPress! :\
    Signature
    Write comprehensible articles on *any* topic in seconds with First Draft...
    First Draft's: Download | Add-Ons | Templates | Purchase | Support | Affiliates
    {{ DiscussionBoard.errors[10225047].message }}
  • Profile picture of the author Leading-IM.com
    Try the "Better Search Replace" plugin (https://wordpress.org/plugins/better-search-replace/). Maybe try searching for "color: #ffffff;" and replacing it with "color: #000000;". That way it doesn't matter if the color is being set in a span, div or p tag.
    {{ DiscussionBoard.errors[10225112].message }}
  • Have you tried CSS? You could change the span color in your stylesheet something like this

    span{
    color:#000 !important;
    }

    Doesn't remove it, but you can change the color.
    Signature
    Premium WooCommerce & WordPress Plugins $10/ea. or FREE With Membership. PluginForage.com
    {{ DiscussionBoard.errors[10226546].message }}

Trending Topics