Tag Info

Hot answers tagged

4

You could check to see if the 'WooCommerce' class exists, then run the code that requires WooCommerce. <?php if ( class_exists( 'WooCommerce' ) ) { // code that requires WooCommerce } else { // you don't appear to have WooCommerce activated } ?>


2

First of all, I'd strongly recommend against storing translations for a plug-in in your theme. It has no reason to be there, and you'll loose the translations when you change/update the theme. The correct place to store translations is wp-content/languages/plugins/. This code does that, and targets the domain 'other_plugin': function ...


1

Go into your themes single.php file and put this code in a proper place under the the_title(); This Post was written by <?php the_author(); ?>



Only top voted, non community-wiki answers of a minimum length are eligible