ARGH! Wordpress wp-ecommerce page heading issue - plz halp >.<

Kershaad

New member
Mar 22, 2010
43
1
0
Hi all,

I don't know if this is really the right place (or the right forum) to ask this sort of question, but people here seem to know pretty much everything about everything, and I've got a wordpress/wp-ecommerce/php problem that's driving me up the wall.

I have installed and configured WP-eCommerce on a site and for the most part, it is working fine - except for one really random problem I can't seem to fix:
You will notice that when you click the normal store link, the navigation links at the top of the page are correctly labled to traverse the site, however if you go to a product or category, all those links change their wording to be the same as the product/category you're viewing. It also changes the text for all the recent posts as well (under 'Recent Information' on the sidebar). Sample Pic Attached.

I've tried disabling all my plugins and it made no difference, changing the permalink styles, using the fix permalinks tool in wp-eCommerce, and generally fiddled about whereever I could think of - still nothing.

Any help you can give will be greatly appreciated. I'm going %^*$ing mad here... I've spoken to the guy who originally wrote the theme, he can't figure it out, I've tried asking the guys who wrote wp-ecommerce but 'customer support' doesn't seem to be an area of 'focus' for them.

Wordpress Version: 2.9.2
wp-eCommerce Version: 3.7.5.3
Extras: Gold Cart, Members Only & Product Slider

If you have an idea, an incling, a complete fix, hell - a new remix of banana phone if you think it'd help... please let me know.

~Kershaad.
 

Attachments

  • wtfwtfwtf.jpg
    wtfwtfwtf.jpg
    91.3 KB · Views: 6


Hey...at first glance and without being able to look at the theme, I would guess it has something to do with the way the navigation is coded inside header.php. Not sure what function is being used here to output the <li>'s, but it's likely something like wp_list_categories. You can see all the arguments available (along with some examples) that can be passed to it here: Template Tags/wp list categories WordPress Codex

It looks like in the internal pages, the function is outputting the category you're in when that list needs to be the top level cats. This is just a guess though, without looking through the code and messing with it a little. Hope this gets you pointed in the right general direction.
 
header file

Hi mate,

Thanks for the starting point. :)

If it's any help, please see the attached header.php file from their theme. The theme is called centivio. Let me know if anything else would be of use to try and pin point this prick of a problem. lol

Kershaad.
 
lol. lets try that again. It didn't seem to appreciate my .php attachment.

Renamed to .txt
 

Attachments

  • header.txt
    7.9 KB · Views: 5
That's really a weird issue because it gets the permalink and meta right, but not the title. I think I've actually come across something similar before - it wasn't exactly the same thing but I remember stuff being messed up like this with multiple loops on the same page, especially when they were objects like your current theme uses.

Try doing this - take out lines 117 - 120 of header.php and replace with the following:
Code:
<?php	 wp_reset_query(); //start edit
query_posts('post_type=page&meta_key=menu&meta_value=yes&showposts=5&orderby=menu_order&order=asc'); ?>
<?php while(have_posts()) : the_post(); ?>
<li class="<?php if(get_the_ID()==$cPageID) {echo 'current';} ?>"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a><span class="descmenu"><?php $values = get_post_custom_values("menu-details"); echo string_limit_words($values[0], 25); ?></span></li>
<?php endwhile; 
wp_reset_query(); //end edit
?>

- replaced the object instance with a default query after resetting the previous query
- reset the query again after finishing the loop, for following loops.

Try and let us know if it works.
 
Holy crap on a cracker - IT WORKED!! Holy crap, it worked!!

*does a little dance*

bobsoap - you're my new hero. lol

In case anyone is wondering, for the 'recent posts' section that was buggered, I ditched the default recent posts widget and replaced it with a simple PHP widget with the following which fixed the problem:

Code:
<ul>
<?php wp_get_archives('title_li=&type=postbypost&limit=5'); ?>
</ul>
 
I had also posted it over on the forums of the people who wrote wp-ecommerce... over a week ago. amusingly, it didn't get any coder-input until after I marked it as resolved. They then gave me an alternate fix as well.

But an alternate fix for a fix that already works is of little consequence to me - especially when it's a day late and a buck short, so to speak. lol.

Link: HELP!: Categories/Products Pages mess up site navigation and menu WP e-commerce Forums