Recent Topics

1 Feb 14, 2006 22:54    

The date is automatically wrapped in an H2 pair... Where is that h2 coming from?

jj.

2 Feb 15, 2006 15:56

Which date are you talking about? The date just above the post title on [url=http://blog.thedarksighed.com/]your blog[/url] is wrapped in h1. Did you resolve this issue, or am I looking in the wrong place?

3 Feb 15, 2006 17:04

No, not on my production blog.. this is a test blog I've installed using the 1.6 Alpha. I've tried several of the included skins as I work on designing my own from scratch. Each of the ones I tried has the article post date wrapped in an H2 pair, but that code is not in the _main.php file.

For example, this is the code being used in the template I'm building:

<?php // ------------------------------------ START OF POSTS ----------------------------------------
	if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post

	if( isset($MainList) ) while( $Item = $MainList->get_item() )
	{

		echo T_('<div class="date clearme">');
		$MainList->date_if_changed();
		echo T_('</div>');
		locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
	?>

But when the page is rendered, the date is wrapped in an H2 pair... For example, the same thing happens in the nifty_corners skin which is included in the Alpha release.

jj.

4 Feb 15, 2006 18:01

The date_if_changed() function has default parameters like so:

$MainList->date_if_changed('<h2>', '</h2>');

If you don't specify anything in the parenthesis, it puts h2 tags in. So, you can change it to this:

$MainList->date_if_changed('', '');

to have nothing before and after it. Or customize it however you want:

$MainList->date_if_changed('<div class="date clearme">', '</div>');


Form is loading...