Can I upgrade plugins via FTP?

Short answer: yes you can upgrade your plugins via FTP. Download the new version of the plugin. Disable the plugin you are about to update. Upload files over the top of the plugin. Re-enable plugin If the plugin is written well stats, settings and options should remain intact. As Rarst has already mentioned the automated … Read more

Get a list of galleries from an album in NextGEN Gallery [closed]

Put this into your page template: <?php global $nggdb; $galleries = array(); $album = $nggdb->find_album(1); foreach( $album->gallery_ids as $galleryid ){ $gallery = $nggdb->find_gallery($galleryid); $galleries[$galleryid][‘title’] = $gallery->title; $galleries[$galleryid][‘url’] = get_bloginfo(‘url’) . ‘/portfolio/?album=all&gallery=’ . $galleryid; } foreach($galleries as $category){ echo ‘<a href=”‘ . $category[‘url’] . ‘”>’ . $category[‘title’] . ‘</a><br />’; } ?> You have to adapt … Read more

WordPress sending emails continuously. How to stop it?

The problem I think the problem here is that you’re generating an infinite loop, by placing wp_mail() inside the $phpmailer->action_function callback, that fires after each email. Each time you send an email with wp_mail(), you call wp_mail() again, and again, and again … etc Possible workaround You should instead use, for example, the following approach: … Read more

Hide Theme options and Customize Admin menu

Direct answer: add_action( ‘admin_menu’, function() { global $current_user; $current_user = wp_get_current_user(); $user_name = $current_user->user_login; //check condition for the user means show menu for this user if(is_admin() && $user_name != ‘USERNAME’) { //We need this because the submenu’s link (key from the array too) will always be generated with the current SERVER_URI in mind. $customizer_url = … Read more

WordPress plugin for affiliate referral system

Don’t know about a plugin but this can be done easily with just two hooks and callback functions: First you add the refferer field to the registration form using register_form hook: add_action(‘register_form’,’show_reff_field’); function show_reff_field(){ ?> <input id=”ref” type=”text” tabindex=”20″ size=”25″ value= “<?php if (isset($_GET[‘ref’])){echo $_GET[‘ref’];} ?>” name=”ref” readonly=”readonly”/> <?php } Then you just need to … Read more