Thematic Fix: Product Title displayed instead of Category Title

This topic is: not resolved

This topic contains 0 replies, has 1 voice, and was last updated by  cannobbio 2 years ago.

Viewing 1 post (of 1 total)
Author Posts
Author Posts
May 24, 2011 at 8:28 am #105065

cannobbio

Thanx to @Mychelle for his/her post: http://getshopped.org/forums/topic/product-title-is-been-displayed-instead-of-the-category-title/

I’m using Thematic 0.9.7.8 and WPEC 3.8.3
To fix this in Thematic put this on your functions.php:

// WPSC Category title fix
function childtheme_override_postheader_posttitle() {

	if (is_single() || is_page()) {
		$posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>n";
	} elseif (is_404()) {
		$posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>n";
	// This is the fix
	} elseif ( 'wpsc-product' == get_post_type() && !is_single() ) {
		$posttitle = '<h1 class="entry-title">' . wpsc_category_name() . "</h1>n";
	} else {
	        $posttitle = '<h2 class="entry-title"><a href="';
	        $posttitle .= apply_filters('the_permalink', get_permalink());
	        $posttitle .= '" title="';
	        $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
	        $posttitle .= '" rel="bookmark">';
	        $posttitle .= get_the_title();
	        $posttitle .= "</a></h2>n";
	}

	return apply_filters('thematic_postheader_posttitle',$posttitle); 

}

cya

Viewing 1 post (of 1 total)

The forum ‘3.8 Stable Release’ is closed to new topics and replies.