How to Make a Slightly More Clever WordPress Change

My previous WordPress post talked about making a minor change by “brute force”: work your way through the \style.css file, tweaking one colour at a time, until you find the right place to make the change.

This time, let’s do a little more thinking.

Suppose you want to change the colour of hyperlinks, but only in the header. The \style.css might give you some hints, but to really get into it:

  • Open the \header.php file
  • Look for a style id, perhaps header.text.link
  • Copy that name (header.text.link)
  • Make no changes! But now re-open \style.css
  • Use the browser to search for that id (header.text.link)
  • If you find it, add your “colour: #AA2288;” change at the end of that description
  • Save the change, and check the result

This is no guarantee of success, but it may give results sooner than simply trying each spot.

Bonus TIP: I used this approach yesterday, and realized that the original developer had not set a colour code where I wanted to make my change. There was the reason why I had not found a code to change: without a previous code, there was nothing I could find and change.

Warning: The term “style id” and the example “header.text.link” are probably not the right technical terms.

Advertisements

You must be logged in to post a comment.

%d bloggers like this: