Recent Topics

1 Feb 06, 2012 02:05    

My b2evolution Version: 4.1.x

How do I add "Featured Post: " before the title of any featured post? And can it be done in the same formatting (font size, color, etc.) as the title itself?

2 Feb 06, 2012 04:27

<?php
// Go Grab the featured post:
if( $Item = & get_featured_Item() )
{	// We have a featured/intro post to display:
	// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
	skin_include( '_item_block.inc.php', array(
			'feature_block' => true,
			'content_mode' => 'auto',		// 'auto' will auto select depending on $disp-detail
			'intro_mode'   => 'normal',	// Intro posts will be displayed in normal mode
			'item_class'   => 'featured_post',
			'image_size'	 =>	'fit-400x320',
		) );
	// ----------------------------END ITEM BLOCK  ----------------------------
}
?>

'item_class' => 'featured_post', defines it right there.

if you dont have it there just add it. and go crazy styling .featured_post { /*rad css skills*/ }

about the title, dont know if there is a parameter for that.

3 Feb 06, 2012 05:59

Find this code in your skin

<h2><?php $Item->title(); ?></h2>

change it to

<h2><?php

if( $Item->is_featured() ) echo 'Featured Post: ';
$Item->title();

?></h2>

4 Feb 06, 2012 08:21

You rock, as usual! Thanks sam2kb


Form is loading...