Jquery NoConflict Problem

Try and call method `prettyPhoto’ when DOM is ready, replace your code: jQuery.noConflict() jQuery(function(){ jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto(); }); with this: jQuery(document).ready(function($) { $(“a[rel^=’prettyPhoto’]”).prettyPhoto(); }); Also ‘Paid Downloads’ plugins enqueues latest version of jQuery used by WordPress it’s 1.6.1, it would be better if you register same version of jQuery from Google-CDN as WordPress does

Changing settings of WooCommerce

You have two options: Contact Woo You can ensure your changes will be permanent by contacting WooThemes (the authors of the plugin) directly and asking them to add your country’s currency to the list. Use a filter Alternatively, remember that everything is filtered. Woo is using the woocommerce_currency_symbol filter in woocommerce.php. To add currencies to … Read more

Add script into front from my plugin

Use wp_enqueue_scripts and admin_enqueue_scripts actions to enqueue your scripts: // for front end add_action(‘wp_enqueue_scripts’, array(&$this, ‘load_my_scripts’)); // for back end add_action(‘admin_enqueue_scripts’, array(&$this, ‘load_my_scripts’)); Also pay attention that it is bad practice to load your scripts on all pages of the site. Load your script only if need be: // … function load_my_scripts() { if ( … Read more

How can I use get header from within my plugin?

I’ve created a rewrite do redirect like: /mylisting/909 ->/wp-content/themes/myplugin/edit.php?id=909 Which seems to make sense as I’m keeping the very specific logic to an individual plugin. There is a better way: Create an endpoint, use your code in a callback handler for the new URL. You get the whole theme environment for free here: get_header(), sidebars, … Read more

register_activation_hook in oop approach

It doesn’t really matter. If you simply must have it inside a class, I would use a constant and a static method. // in the main plugin file define( ‘MYPLUGIN_FILE’, __FILE__ ); // include another file with this class in class MyPlugin { public static function init() { register_activation_hook( MYPLUGIN_FILE, array( ‘MyPlugin’, ‘install’ )); } … Read more