Multisite development environment

I don’t have any experience with your specific configuration so I can only offer some general advice. But obviously the closer a development/test environment is to the production environment the better. Saves a lot of headache in the long run. If your production environment is already configured and live I’d do everything possible to duplicate … Read more

Embedding screencast.com Videos in WordPress Multisite

Screencast.com has a dedicated GitHub page with hands full of tutorials (no need to clone them over here). You can then utilize wp_oembed_get() or register a new provider using wp_oembed_add_provider(). echo wp_oembed_get( ‘http://example.com’, array( ‘width’ => 1920, ‘height’ => 1080 ) ); Or add the provider: wp_oembed_add_provider( ‘http://screencast.com/*’, // The Format ‘http://screencast.com/’, // The Provider … Read more

How i can get blog info using site url in multi-site

Use get_blog_id_from_url() function to retrieve blog id from url and then use get_blog_option() function to get information for that blog. Example : $blog_id = get_blog_id_from_url(“a.somename.com”); echo get_blog_option( $blog_id, ‘siteurl’ ); echo get_blog_option( $blog_id, ‘blogname’ ); echo get_blog_option( $blog_id, ‘blogdescription’ );

Query users by capability – uninstall/deactivate callback

It was actually much easier than I originally thought – just doing a WP_User_Query for a meta value (meta arrays are supported as well, like for the other query classes). public function on_deactivate() { $meta_key = ‘tools_page_tsi_per_page’; $query = new WP_User_Query( array( ‘meta_key’ => $meta_key ) ); if ( empty( $query->results ) ) return; foreach … Read more

Multi language site with same content

Storing it in a session would certainly be possible, but is not necessary at all. Unless you’re looking for a way to not include the query string in subsequently visited URLs. Here I’d rather go with a cookie than a session, since WP already relies on cookies and does not use sessions. But that’s a … Read more

Displaying a message upon user registration

http://codex.wordpress.org/Plugin_API/Action_Reference/user_register This action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument. add_action(‘user_register’, ‘registration_redirect’); function registration_redirect($user_id) { $url=”PAGE_WHERE_YOUR_CODE_IS_DISPLAYED”; wp_redirect( $url ); exit; } placing that in your functions.php should work. This attempts to redirect the user … Read more

Speed up MU WordPress on Apache VPS?

I checked your site with webpagetest.org : http://www.webpagetest.org/result/130803_C5_3FE9/1/details/ You are loading a lot of information from a lot of different places– Facebook, Google, Twitter, Pinterest, doublclick… You are loading something like 80 resources from remote locations (To be honest, I lost count but that is in the ballpark). That is more than half– 55-60%– of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)