Recent Topics

1 Jul 04, 2006 14:53    

Hi there,

for a better SEO I would like to put the title of a post in the html <title> tag. The point is, that the title of the site should only change, if you clicked on the permalink of a post.
Hence, I need to check if a permalink was clicked and in dependence of that I need to change the <title> tag in the appropriate _main.php, right?

I would be grateful, if somebody would have some helpful ideas or knows a variable or something, which could be checked.

Cheers!
christian

2 Jul 04, 2006 16:46

By design b2evolution will include the post title in the permalink page, which is what the person sees when they click the permalink. It is also what search engines index when they follow your permalink. Do you want that to ONLY show up when someone clicks a permalink icon?

3 Jul 04, 2006 17:30

Hi EdB!

Thanks a lot for the quick reply!

You are right, search engines follow the permalink like it is included and shown when a person clicks the permalink.

Absolutely, I would like to show it in the <title> when someone clicks the permalink icon. Do you have some ideas where and how I could implement the title?

Actually, it isn't only to show the title. Fact is, that some search engines will give a higher evaluation, if the search-key-words are in the <title>...</title>.

Cheers!
Christian

4 Jul 05, 2006 00:38

It's in your skins/skinname/_main.php file. Depending on version it'll be like this:

<meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset() ?>" />
<title><?php
	$Blog->disp('name', 'htmlhead');
	single_cat_title( ' - ', 'htmlhead' );
	single_month_title( ' - ', 'htmlhead' );
	single_post_title( ' - ', 'htmlhead' );
	arcdir_title( ' - ', 'htmlhead' );
	last_comments_title( ' - ', 'htmlhead' );
?>
</title>
<base href="<?php skinbase(); // Base URL for this skin. You need this to fix relative links! ?>" />

5 Jul 05, 2006 10:58

Hi!

Well, thank you very much!
That's absolutely what I needed.
In addition to that I would like to check something like the following pseudocode shows:

<meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset() ?>" />
<title>
<?php
if ( permalinkOfThisPostWasClicked ) {
 $Blog->disp('name', 'htmlhead');
 single_cat_title( ' - ', 'htmlhead' );
 single_month_title( ' - ', 'htmlhead' );
 single_post_title( ' - ', 'htmlhead' );
 arcdir_title( ' - ', 'htmlhead' );
 last_comments_title( ' - ', 'htmlhead' );
} else {
 echo ( "Another Title" );
}
?>
</title>
<base href="<?php skinbase(); // Base URL for this skin. You need this to fix relative links! ?>" />

Yeah...you see, the point is, I don't know how to check "permalinkOfThisPostWasClicked". Could it be, that a variable or parameter is set, if you click a permalink to see the whole post?
Do you have any ideas?

Thanks a lot!
Christian


Form is loading...