On Tumblr, I am trying to make a landing page with, for example, an "Enter" button that brings the user to the home page. I found the following code that redirects the site to a /welcome page, which I placed in the index page.
<script type="text/javascript">
if(location.href == 'http://ihadcats.tumblr.com/') location.replace('http://ihadcats.tumblr.com/welcome');;
</script>
Of course, on the 'welcome' page, when you press <a href="http://ihadcats.tumblr.com"
it just loops back to the welcome page.
I created a custom page '/home', to use instead of the index page. I placed the normal index code into a separate '/home' page, but the code doesn't render. It displays, for example "{Title}" instead of the actual title.
When the Index page is loaded, Tumblr bakes in a lot of its own scripts. When the '/home' page is loaded, none of Tumblr's scripts are loaded. Though the code in both pages is exactly the same. Any ideas?
Tumblr variables and blocks don't render on custom pages, only in the main theme code. Basically it doesn't see them as special key words or anything it just sees them as a normal webpage would see them.
As for making a landing page you can tag every post you make with some arbitrary tag like 'x' and then make your index page a landing page and then wrap all your code in {block:TagPage}
{/block:TagPage}
so that the theme code only displays on tag pages (and you would code permalink pages like normal).
Alternatively you could do as suggested above and make a welcome 'popup' of sorts.
来源:https://stackoverflow.com/questions/29222013/making-tumblr-landing-page