Changing WordPress Header-text

  • Posted on September 3, 2014 at 18:38

Status change

Up until about a year ago I thought of myself as an IT-guy lacking ambition. You may have read about it.
But things can change! People can change. Your status can change…

But what if you have your status listed as an under-title in your WordPress-blog?
You would update, you say?
Yes, but how in the world can you do that in WordPress?

 

Problem

To cut a long story short; I didn’t really find an easy way on changing the layout of what WorPress calls the Header-text. Of course, changing the text is not a problem. But specifically changing the layout or making it an hyperlink. That’s where it gets troubling.

Finding the header-text in the database was doable:

MySQL Query: Header text

Updating using SQL was also a peace of cake. But inserting HTML-code appeared to be ‘impossible’.
WordPress, or Apache, or PHP, whoever you want to blame, just renders the HTML to unformatted text. And that is not cool!

 

Solution

I just edited the header.php file, and added raw HTML.
File: [apacheroot]/wordpress/wp-content/themes/purple-pastels/header.php

VIM Screenshot of header.php

This is particularly a solution that I am not proud of. But I am proud of the result!

Just have to keep in mind that an update of the theme my so beloved updated header-text will be gone.
Therefor I documented all this.

Leave a Reply