Search code examples
javascripthtmltumblr

Tumblr: Creating a Custom Home Page


I have been searching around for links that I thought could help me in designing a customized home page for my tumblr, without showing the posts unless a link refers to a tagged page or a permalink page. Unfortunately I have found nothing that works, at least in the sites I've been to. Could someone please assist me on how to make this work?

Is there a certain code (like Javascript) that I have to insert? I'm pretty vague on Javascript except on CSS3 and HTML. Thanks in advance for answering!


Solution

  • Seperate homepage / tagged / permalink pages

    It is possible to have different content / visuals for the following pages:

    1. Homepage - http://you.tumblr.com
    2. Tagged Page - http://you.tumblr.com/tagged/yourtag
    3. Permalink Page - http://you.tumblr.com/post/123456/your-post-title

    {block: IndexPage}, {block:PermalinkPage} and {block:TagPage} are your friends.

    Below is an example of a homepage with no posts, and the tagged / permalink containing posts.

    {block:IndexPage}
    <h1>Homepage</h1>
    <!-- Don't include Post loop here -->
    {block:TagPage}
    <h1>Tag Page</h1>
    <!-- Include Post loop here -->
    {block:Posts}
    {block:Text} 
    {block:Title}{Title}{/block:Title}
    {Body}
    {/block:Text}
    {/block:Posts}
    {/block:TagPage}
    {/block:IndexPage}
    
    {block:PermalinkPage}
    <h1>Permalink Page</h1>
    <!-- Include Post loop here -->
    {block:Posts}
    {block:Text} 
    {block:Title}{Title}{/block:Title}
    {Body}
    {/block:Text}
    {/block:Posts}
    {/block:PermalinkPage}
    

    Inside the Posts loop include what ever post types you need. More information can be found here: http://www.tumblr.com/docs/en/custom_themes#basic_variables & http://www.tumblr.com/docs/en/custom_themes#tag-pages