Build Your Own Business Website header image

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

Lesson 7 – Part 8 – Add the Faux Page Title to the Posts Page

Difficulty Level -

Filed Under Topics - ,

Listed Under Lesson Subjects -

Applies to -

The next thing for us to do is to add our faux page title. Remember that our faux page title looks like this, we’ve got an image, we’ve got this word Blog and we’ve got our dashed line under that. We need to add this faux page title to our page and it looks like this.

Add H1 Tag to Posts Page

We’re going to say function crtc_faux_posts_page_title then what we’re going to do is close out PHP, open up PHP again and in this place, what we’re going to add is a div id=”faux-page-title” then inside of this, we’re going to put an h1 and it’s going to be Blog.

We’ve now added our h1 tag back into our Posts page and we need to make sure that we only do this on the Posts page itself so if (is_home), then we’ll put this div in full page title then add Blog as the title, we will add_action(‘thesis_hook_before_content’, and our ‘crtc_faux_posts_page_title’);. If we wanted to internationalized this so that this could be translated, you could use something other than a Blog.

Internationalized the Posts Page

We could go back into php here and say, php _e(‘Blog’, ‘crtc’); this is how we should do this anyway and exit php. This is how you internationalized this, we’ve talked about this briefly already. Actually, it’s not just one, it’s two underscores e so now it’s going to php __e(‘Blog’, ‘crtc’); and if somebody comes along with a language file that they want to add to this, it’ll swap out Blog for whatever they put in its place.

We echo that in that place, save the document, upload it, refresh it and we should now have that up here. I have a code error there obviously, let’s see here. I think I’ve got that under sidebars, no I didn’t do that in sidebars. Did I do it in front page? Yes, it is only a single underscore, my mistake. That’s why it’s choking. It’s not a double underscore, it’s a single underscore. Save it, upload it, refresh it and we should be good. There it is, Blog is up there.

Save $200 on Membership Now!

Start learning today for as little as
$0.82 PER DAY!
THIS IS A LIMITED TIME OFFER!
Subscription Options
0 Comments… add one
0 comments… add one

Leave a Comment