Category Archives: Plugins

Hide Contactform 7 from editor role

In wp-config.php:

 PHP |  copy code |? 
1
/* limit access to contactform 7 */
2
define( 'WPCF7_ADMIN_READ_CAPABILITY', 'manage_options' );
3
define( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY', 'manage_options' );

Posted in Contact Form 7 | Leave a comment

Jigoshop Sidebar

  • Register a custom sidebar called sidebar-shop.php
  • Add widgets
  • Shop pages will load this sidebar in place of default
Posted in Jigoshop, Plugins, Wordpress 3 | Leave a comment

Change URLs of Shopping Cart, Products Page, Account Page and Transactions page

Go to http://www.yourdomain.com/wp-admin/options.php and edit the fields for:

  • product_list_url
  • shopping_cart_url
  • transact_url
  • user_account_url
Posted in WP Ecommerce | Leave a comment

Category Shortcode

Used to display the products in a given category:

 PHP |  copy code |? 
1
[wpsc_products category_url_name='gold-jewellery']

Name parameter uses the category slug

Posted in WP Ecommerce | Leave a comment

Print Category Description

Within the wpsc category loop:

 PHP |  copy code |? 
1
 <?php wpsc_print_category_description("<div class='catDescription'>", "</div>");   ?>

Parameters are html used to wrap the description

Posted in WP Ecommerce | Leave a comment

Create wpsc category loop

Starts loop to show all or selected categories.

1) Show default category

 PHP |  copy code |? 
1
<?php wpsc_start_category_query(array('category_group'=>get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>

2) Show all categories

 PHP |  copy code |? 
1
wpsc_start_category_query(array('category_group'=>1,'show_thumbnails'=>get_option('show_category_thumbnails')));

Do some stuff here with the category data.

End the loop.

 PHP |  copy code |? 
1
<?php wpsc_end_category_query(); ?>

Posted in WP Ecommerce | Leave a comment

Show Category Image in Template

Must be within wpsc category loop

 PHP |  copy code |? 
1
<?php wpsc_print_category_image(get_option('category_image_width'), get_option('category_image_height'));
2
                    ?>

Posted in WP Ecommerce | Leave a comment

Views Featured Image Size

Specify featured image size using WP Views field:

 HTML |  copy code |? 
1
[wpv-post-featured-image size="full"]

Can define new image sizes in functions.php and use them for specific instances

Posted in Views, Wordpress 3 | Leave a comment

No Posts Found Text Shortcode

Shows text within shortcode tags when no rows are returned by the view

 HTML |  copy code |? 
1
[wpv-no-posts-found]<strong>No posts found</strong>[/wpv-no-posts-found]

Posted in Views | Leave a comment

Views using URL parameters for filters with spaces in the name

When using URL parameters to specify a filter use the Taxonomy name and use %20 in place of spaces.

 HTML |  copy code |? 
1
/12/latest-reviews/?wine=Sauvignon%20Blanc&vintage=2010

Posted in Views | Leave a comment