Set cookie then immediantly refresh the page

The setcookie function prepares the HTTP cookie header to be sent at the next page load. That’s why the $_COOKIE superglobal is not updated automatically. You could manually update $_COOKIE for use on the current request. Just put this below your setcookie() line: $_COOKIE[‘mobileesp_wp_full_site’] = ‘true’; By the way, I’d prefer not to work with … Read more

How to get popular post from across a network?

simple list all last post about the network, not the popular posts; for popular posts you must use an plugin or track via Google Analytics etc. <ul class=”postlist no-mp”> <?php $blogs = $wpdb->get_results( “SELECT blog_id,path FROM {$wpdb->blogs} WHERE blog_id != {$wpdb->blogid} AND site_id = ‘{$wpdb->siteid}’ AND spam = ‘0’ AND deleted = ‘0’ AND archived … Read more

plugins_url() incorrectly returns a url with www subdomain

You can try to override it by using the following in config.php and see if it works as it will update your database, doing so will make it unable to be changed in your admin (it will be greyed out). define(‘WP_SITEURL’, ‘http://example.com/’); And some alternative definitions, http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29 If that doesn’t work, I would check your … Read more

Is it possible to integrate WordPress *posts* and social media (Facebook, Google+, Twitter)? [closed]

Search for plugins: http://wordpress.org/extend/plugins/simple-twitter-connect/ and http://wordpress.org/extend/plugins/simple-facebook-connect/ and http://wordpress.org/extend/plugins/simple-google-connect/ All require applications be built at each service for different levels of interaction with a WordPress site, including automatic excerpt posting (except for G+), tweeting and linking.

Diagnosing plugin conflicts

Does your file-server have an error log in the WP Directory? I would start by turning on the DeBug and error reporting via the wp-config file. Open your wp-config and add this from the WordPress Codex Debugging page if it’s not already there: // Enable WP_DEBUG mode define(‘WP_DEBUG’, true); // Enable Debug logging to the … Read more