How to edit/delete single row items in a table on my own menu page

WordPress allows you to use a class called wpdb Here is an example of how you would use it function add_to_db() { global $wpdb; $your_table_name = $wpdb->prefix . “wp-LINKS-list-table”; $the_value=”123″; $wpdb->insert( $your_table_name, array(‘column_name’ => $the_value,)); this will insert 123 into the column_name. You can read more here Note: If you are creating a menu page … Read more

WP 3.4 has missing photo data

Having figured out the issue, I’d like to update this question. The issue stems from previous versions of WP not including the _wp_attached_file meta key when uploading media, which 3.4 now seems to require. Below is PHP code for looping through the database, verifying the presence of both the key and image file, then updating … Read more

Importing Multiple DB to one MU database

Best thing to do is read the docs: http://codex.wordpress.org/Tools_Export_Screen and http://codex.wordpress.org/Importing_Content#WordPress and work with WXR files rather than trying to export directly from the database. You also have the option on Import to grab images. Or you can merge the contents of the three wp-content/uploads/ directories, but be aware that it’s possible some images may … Read more

Merging WordPress posts from different databases

If you never send/sync Production posts to live. Then just pull/copy the live database to the development database via mysqldump (or similar) and use wp-config vars to force the site and blog URL. Use the following in the dev versions wp-config.php to force the URL’s define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’, ‘http://example.com’); You may as well sync the entire … Read more

How to change the database prefix in multisite (WPMU) install

Just call the following function but make sure to change new_prefix with whatever table prefix you want to add and also check whether config file path is correct at your side, i have used find_wp_config_path() function to find it but sometime it may return null. function find_wp_config_path() { $dir = dirname(__FILE__); do { if( file_exists($dir.”/wp-config.php”) … Read more

Ajax with jQuery UI dialog not working

Assuming your javascript and ajax action code are otherwise correct, target admin-ajax.php with the correct path by localizing your enqueued script: wp_localize_script( ‘your_script_handle’, ‘script_data’, array( ‘admin_ajax’ => admin_url( ‘admin-ajax.php’ ) ) ); Then in your javascript, reference that URL with: url: script_data.admin_ajax EDIT- ah, missed this the first time: $wpdb->feedmanager isn’t set unless you’ve explicitly … Read more