Support » Fixing WordPress » First thumbnail request in sidebar wants to call a header path

  • i’m just a little confused at the moment over why one of my code snippets always wants to call a header when I want to call a thumbnail.

    It only happens in the product categories of wp ecommerce for normal posts categories the thumbnail displays no problem.

    It only happens in the first thumbnail call. I use basically the same code in three different widgets to call the latest product, best seller and special offer.

    If I have the latest product widget as the first widget then the other two thumbnails display ok but the thumbnail does not display in the latest product and the image path is: images/headers/path.jpg

    If swap the best seller or special offer widget with the latest product then then its thumbnail displays ok and the one I swap fails to display and the image path is changed.

    An example page is:

    The code snippet I am using is:

    global $post;
    $args = array( 'post_type' => 'wpsc-product','numberposts' => 1, 'orderby' => 'rand', 'wpsc_product_category'=>'best-sellers' );
    $myposts = get_posts( $args );
    foreach( $myposts as $post ) :	setup_postdata($post); ?> <div id="specoff">
    <ul>	<li><div id="specoffthumb"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( array(180,150)); ?></div><div id="specofftitle"> <?php the_title(); ?></a></div>
    <div id="specofforigprice"><?php _e('Price', 'wpsc'); ?>: <span id='product_price_<?php echo wpsc_the_product_id(); ?>' class="currentprice pricedisplay"><?php echo wpsc_product_normal_price(); ?></span></div>
    </li> </ul></div>
    <?php endforeach; ?>

    The code is basically the same but with different category id calls.

    I can live with the dead image call but I am confused as to why it should only happen to the first widget when the other work ok.


Viewing 1 replies (of 1 total)
  • Sorry, I should also say that this issue has only started after updating to the latest version of wordpress 3.4

    There were no issues with wordpress 3.3 and earlier.

Viewing 1 replies (of 1 total)
  • The topic ‘First thumbnail request in sidebar wants to call a header path’ is closed to new replies.