开发者

How to create splash page in WordPress

I'm looking to display splash page at the beginning of a site. How can I d开发者_如何转开发o this in WordPress?

I have created the static home page by going to admin->setting->reading .. But I need to display one page before that, it will ask the user to click the enter button for entering into the site.

Please someone help me!


What exactly do you need a splash-screen for? Setting a static page to load first under Settings->Reading is the best way to accomplish this. Why not set the static page to your splash screen, and then link to your static home page from said page?


Also, you could create a page-template for that specific page, and then select that template in the page settings menu.



I was looking for a solution for this..
Here is mine:

On the root of your wordpress installation, in the index.php,
before
the comment Loads the WordPress Environment and Template, add something like this

if( (strpos($_SERVER['HTTP_REFERER'], 'yourdomain.com') === false) && !$_SERVER['QUERY_STRING']){
    include 'splash.html';
    exit();
}

Then edit/create your splash.html.

Please note that any wordpress update might overwrite the index.php on the root.

Hope it helps anyone!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜