cross-site custom menu

You can use the switch_to_blog() function to temporarily use data from a specific site instead of the current site. switch_to_blog(1); // Switch to Site ID 1 // wp_nav_menu(); restore_current_blog(); // Switch back to Current Site // restore_current_blog switches back to the current blog’s data.

Using custom tables for old posts

a simple and Not perfect solution which will do most of the job for you is to overwrite the table names like this: function custom_prefix_change($sql) { global $wpdb,$wp; $prefix = $wpdb->prefix; if(is_single()){ //check if the post exists in the genuine posts table $results = $wpdb->get_results($sql,”ARRAY_A”); if($results[0][‘ID’]){ //if exists then return return $sql; }else{ //else change … Read more

Migrating from PDO using SQLite to clean new install using MySQL

I found out what is wrong. The tutorial says to remove all double quotes ” and replace them with spaces or backticks `, but some values in the mentioned tables have double quotes around them. This one for example: INSERT INTO “wp_usermeta” VALUES(14,1,’wp_capabilities’,’a:1:{s:13:”administrator”;s:1:”1″;}’); So replacing that with backticks causes malfunction. Replace only double quotes around … Read more