Wordpress title issue

Hello,

I am facing issue in the page title of wordpress post.

Example link : http://www.apniisp.com/blog/krrish-3-dubai-press-conference

Current page title : Krrish 3 Dubai press conferenceApniISP.Com - Blog

In the above title, first part is the post title and second part is blog name but both are coming together.

How can I put a space between them?

Best Regards
Hassan

In one of your template files there should be a <title></title> HTML element that has the Wordpress function inside of it which generates the title of the document. I don’t know how your template hierarchy is set up, but the first place for you too look is in your template’s header.php file if there is one and look for something like this:

<title><?php wp_title( '|', true, 'right' ); ?></title>

The first argument in the wp_title function call is the separator between the post title and the name of your website. Mine is a pipe character (|). Between the two single quotes you can put in one or more spaces that will place spaces between your post title and site name. Something like this:

<title><?php wp_title( ' ', true, 'right' ); ?></title>

The PHP code between your <title></title> elements may be different. The idea is the same. Another example:

<title><?php bloginfo(‘name’); ?><?php wp_title(’ '); ?></title>

Hi cheesedude,

I found this in the header.php under my current theme folder and tried to place spaces according to your instructions but nothing changes.

<title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

Best Regards
Hassan

Inside of your <title> element put the word “TEST” like this and remove it when testing is done:

<title>TEST <?php wp_title( '|', true, 'right' ); ?></title>

Make sure you save the file. :wink: And it would be a good idea to make a backup copy of your files before you modify them.

If changing header.php does not work, you are going to have to explore a few more of your template files to determine where in the Wordpress template hierarchy your <title> text is coming from. Try looking in index.php, category.php, and then work your way through the rest of the files. It has to be in there somewhere. Now that you know what you are looking for, you are going to have to search through your template files and find it.

http://codex.wordpress.org/Theme_Development

One thing that always bothered me about Wordpress is that HTML can come from different places. It’s like looking for a needle in a haystack sometimes.