WordPress Post tags (get_the_tags & has_tag)

I actually debugged this and found the problem. It is directly related to creating a post via the REST API. I have found that when a post is created via the REST API that the hook callbacks happen in a different order from a post created with the admin UI. Specifically when the REST API … Read more

Disable plugin on Specific Page of Admin

That’s pretty easy. Remember, I don’t know exactly what’s the plugin’s file name and directory, and the following code was not tested. Put this to the functions.php or create a small plugin. <?php add_filter( ‘option_active_plugins’, ‘wpse264498_deactivate_fat_gallery’ ); function wpse264498_deactivate_fat_gallery($plugins){ // check if you are on the certain page global $pagenow; if( $pagenow == ‘post-new.php’ ) … Read more

Plugin form unable to process

You missed name attribute of <input type=”submit” value=”<?php _e(‘Submit’); ?>”/> HTML tag. i.e. It should be looks like: <input type=”submit” name=”Submit” value=”<?php _e(‘Submit’); ?>”/> Else, You have to change if condition inside function form_processing() OLD: if(isset($_POST[‘Submit’])){ Replace with: if(isset($_POST[‘rollNumber’])){ Hope this will helps you.

Force wordpress to request for FTP Info on theme/plugin install/update

I just tried this on a local install that previously used the ‘direct’ FS_METHOD. In wp-config.php, set the following constants: define(‘FS_METHOD’, ‘ftpext’); Not sure if this actually affects things, but I also set these to try to force the input fields to be empty when the form is presented: define(‘FTP_USER’, false); define(‘FTP_PASS’, false); Source: http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants

How can I retrieve data within my widget

Read: SELECT_a_Column $sql = “SELECT ‘liters’ FROM ” . $wpdb->prefix . “tfp”; $liters = $wpdb->get_col( $sql ); if( $liters ) { foreach( $liters as $liter ) { echo ‘<option value=”‘ . $liter . ‘”>’ . $liter . ‘</option>’; } }

Use plugin function outside WordPress file

If you are intent on calling into WordPress functionality from outside of the usual WP workflow, you can put the following two lines in your code: define(“WP_USE_THEMES”, false); require_once(“../../../wp-blog-header.php”); Of course, the above assumes I’m calling this from within a root theme or plugin folder (the ../ indicates reverse folder traversal). It looks as though … Read more