Difference between a theme and a plugin?

Themes manage the display and layout of your blog, but can also add functionality. Plug-ins add functionality to your blog, but can also add elements to the layout. There is a lot of crossover between the two, particularly when you being to bundle certain plug-ins with themes. However, the biggest difference lies in the templates … Read more

force enqueue script to be first in order of prominence

You just need to enqueue your scripts before plugin does it. You can do it by setting priority to 0 for your hook. For example, do the following: add_filter( ‘wp_enqueue_scripts’, ‘wpse8170_enqueue_my_scripts’, 0 ); // or if you enqueue your scripts on init action // add_action( ‘init’, ‘wpse8170_enqueue_my_scripts’, 0 ); function wpse8170_enqueue_my_scripts() { wp_enqueue_script( ‘myscript’, ‘http://path/to/my/script.js’, … Read more

Different template of products for specific category. WooCommerce

You could change your single-product.php to just be a redirect to the correct template depending on what product category the current product it. To do so you’d copy single-product.php to your theme’s woocommerce folder. Rename it to single-product-default.php or anything. Create another copy and call it single-product-coffee.php. You can make whatever changes you’d like to … Read more

How to Add Custom Taxonomy To Woocommerce Plugin

You have to do: add_action( ‘init’, ‘custom_taxonomy_Item’ ); Because: Use the init action to call this function. Calling it outside of an action can lead to troubles. see codex page register_taxonomy. Besides that : Better be safe than sorry when registering custom taxonomies for custom post types. Use register_taxonomy_for_object_type() right after the function to interconnect … Read more

Can YOAST SEO fields be removed from custom post type [duplicate]

So as noted in the comments above, I found a solution and used this code to do it: function remove_yoast_metabox_reservations(){ remove_meta_box(‘wpseo_meta’, ‘reservation’, ‘normal’); } add_action( ‘add_meta_boxes’, ‘remove_yoast_metabox_reservations’,11 ); In this instance, “reservation” was my custom post type. And “wpseo_meta” was the ID of the metabox. So the same code can be used on any meta … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)