Hardcode a Plugin into theme

My first recommendation: Don’t do it! If the plug-in author releases an update, you can and will run into conflicts. Particularly if someone installs both the new plugin and your theme at the same time. A much safer route is to build plugin support into your theme. Make things degrade gracefully in case the plugin … Read more

add action wp_head not working

Pull the add_action() outside of the function, and put the conditional inside the callback. Also, if you’re printing a script directly, use wp_print_scripts instead of wp_head. You also have a syntax error. function testingone(){ if( get_option( ‘MyOptionName’ ) ) { ?> <script>var Script = GoesHere; </script> <?php } } add_action( ‘wp_print_scripts’,’testingone’ );

WooCommerce dynamic menus

Suffusion supports WordPress nav menus. You’ll find these in Admin > Appearance > Menus. Simply add your product categories to the menu as children of the ‘Shop’ page. Assign the newly created menu to the “Navigation Bar Below Header” location. http://codex.wordpress.org/Appearance_Menus_Screen

If I delete plugins via FTP are settings kept in DB?

Deleting the plugins’ files (as opposed to deleting via deactivate and delete) will not affect settings. The plugin’s deactivation/deletion code (if any, not all have that) might clear out the plugin’s options. But most plugins will keep the options in case you want to reinstall things. So, deleting via FTP, will not affect the plugins’ … Read more

use function inside another function in WP Plugin

I tried creating a shortcode in my custom plugin, but in order for it to work, you need to apply a filter that converts all the new shortcodes you created to the content. Where the content is being rendered (like in the single.php file), replace the_content() with apply_filters(‘the_content’,get_the_content())