[Solved] Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages

I have got answer for it. I have changed the code to add meteor slides plugin in functions.php to show the slideshow just in the homepage. <?php if ( is_front_page() ) { if ( function_exists( ‘meteor_slideshow’ ) ) { meteor_slideshow(); } } ?> After that i used a plug called WP display header to set … Read more

[Solved] Plugin to install a plugin

You can take a look at TGM-Plugin-Activation plugin. It should give you good starting point. As written in the documentation: TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular … Read more

[Solved] Between functions.php (theme), widgets, and plugins, which is loaded first?

The plugins are loaded right before theme (yes, I’ve been looking for excuse to use this): However it is wrong to think about either as point of code execution. For most cases everything should be hooked and executed no earlier than init hook. According to Codex widget registration with register_widget() should be hooked to widget_init. … Read more

[Solved] Uninstall, Activate, Deactivate a plugin: typical features & how-to

There are three different hooks. They trigger in the following cases: Uninstall Deactivation Activation How-to trigger functions safely during the scenarios The following shows the right ways to safely hook callback functions that get triggered during the mentioned actions. As you could use this code in a plugin that uses plain functions, a class or … Read more

[Solved] What’s the preferred method of writing AJAX-enabled plugins?

the “safer and cleaner” way would be to use admin-ajax.php that comes with wordpress and wp_ajax hook to call your processing function from your plugin file and use wp-nonce to check the integrity of the call. for example: your ajax JQuery call would be <script type=”text/javascript” > jQuery(document).ready(function($) { var data = { action: ‘ACTION_NAME’, … Read more