Archive for April, 2010
WordPress: Getting SplashScreen to work with WP-SuperCache
If you have ever attempted to use the SplashScreen plugin for WordPress with WP-SuperCache, you may have run into issues with WP-SuperCache caching the splash screen and not letting users past it.
There is a quick and simple fix for this, in your template file for what to display on the splash page, put the following code just before the </body> tag:
<?php define ("DONOTCACHEPAGE",1); ?>
This will tell WP-SuperCache not to cache the page and will let the site operate as normal.
Stuart
WordPress Plugin SplashScreen – SEO Fix
After doing some work recently for a client, I discovered that I needed to make some modifications to a plugin for WordPress called SplashScreen.
To be honest when I wrote the fix I did not realise there was a new version released, however I have found out that my fix still provides features I need.
For those that are looking to permit bots and search indexers to access your site using the SplashScreen plugin modify splashcreen.php to reflect the following updated function:
function display_splash() {
function isBot() {
$user_agent= array("bot", "ia_archive", "slurp", "crawl", "spider", "Yandex");
$count = 0;
foreach ($user_agent as $substring) {
$count += substr_count( strtolower($_SERVER['HTTP_USER_AGENT']), $substring);
}
return $count;
}
global $splash;
$bot = isBot();
$splash->getSettings();
if (($splash->allSettings['splashscreen_enable']) && (!is_admin()) &&
(!$splash->is_excluded_url()) && (!isset($_COOKIE["splash"])) && ($bot == 0)) {
// display the splash screen
$dir = dirname(__FILE__) . '/';
@include_once($dir . $splash->allSettings['splashscreen_type']);
exit();
}
}
}
The benefit this has over the newer version is that you can still use an entirely separate page.
Hope it helps someone else.
Stuart