When I first installed the WP-Ecommerce plugin on a website this morning and tried to go to the products page, I got this error:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /public_html/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-functions.php on line 622
Thankfully, it is actually very easy to fix this error. All you need to do is add (array) to the correct line of code in the plugin’s functions.php file.
Find this line in your wp-e-commerce/wpsc-core/wpsc-functions.php file:
$args = array_merge($wp_query->query, array('posts_per_page' => get_option('wpsc_products_per_page')));
And change it to this:
$args = array_merge((array)$wp_query->query, array('posts_per_page' => get_option('wpsc_products_per_page')));
That did the trick for me and hopefully will work for you too. Let me know if you have any questions or run into issues with this.


Get and display the most recent comments from your WordPress blog
Here is the code that I use to get and display the most recent comments from my WordPress blog:
<?php $recent_comments = get_comments( array( 'number' => 5, 'status' => 'approve', 'type' => 'comment' ) ); foreach ($recent_comments as $comment) { ?> <li> <a href="<?php echo get_permalink($comment->comment_post_ID);?>" title="<?php echo $comment->comment_author;?> on <?php echo get_the_title($comment->comment_post_ID); ?>"> <?php echo get_avatar( $comment->comment_author_email, '55' ); ?> </a> <p><b> <?php echo($comment->comment_author); ?> said:</b></p> <p> <?php echo($comment->comment_content); ?> </p> <span style="font-size:12px;font-weight:bold;font-style:italic;"> <a href="<?php echo get_permalink($comment->comment_post_ID);?>#comment-<?php echo $comment->comment_ID;?>" title="<?php echo $comment->comment_author;?> on <?php echo get_the_title($comment->comment_post_ID); ?>"> <?php echo get_the_title($comment->comment_post_ID); ?> </a> </span> </li> <?php } ?> </div>Let me know if you have any questions or need help customizing the code.