PrimePress Theme for WordPress Rotating Header Image

Setting up the WordPress Static Homepage

Some of you might want to display a static front page as the homepage of your WordPress blog. This can now be done in PrimePress using Page templates and here’s a quick tutorial. No fancy magazine style layouts right now but a simple Page with the content of your choice.

Make sure you update your PrimePress theme to the latest version before you proceed.

You need to have two pages ready to implement this.

  • Homepage – A Page with welcome text or anything you wish to show first to your visitors. creating this is pretty straightforward.
  • Posts page – A page to show all your blog posts. You need this because you’ll lose the default blog functionality once you activate the static homepage.

1. Create the blog posts Page

WordPress Blog Template selectionGo to write Page panel in your WordPress Dashboard and create a new blank Page with the title ‘Blog‘. Scroll down to the Page Template options at the bottom and from the drop down list select ‘Blog‘ and publish the Page.

2. Assign the home and blog pages

WordPress Static Homepage OptionsGo to Settings > Reading > Front Page displays and select ‘A static page‘. There are 2 more options to be selected under this. choose a page of your choice for the front page. But for the Posts page select ‘blog‘ and save.

3. Modify the navigation menu

Open main-menu.php in your WordPress Theme Editor. Delete or comment out the marked code in the following code block (everything but the last line).

<li class="<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) )
{ ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a title="<?php bloginfo('name'); ?>" href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_pages("depth=1&title_li=&sort_column={echo $pp_sort_pages}&exclude={echo $pp_exclude_pages}"); ?>

Addendum

Homepage – Any default Page you create will have the title centered at the top. You may not want this on your static homepage. Use the ‘HomePage‘ template for that Page to get rid of this.

Page-Order – A word about the Page Order in the main navigation menu. If you prefer doing things manually, assign a number to each of the Pages in the Advanced Options and they’ll be sorted in ascending order. A better and easier alternative is to use a plugin.

61 Comments

  1. Christiaan says:

    Ravi, you are a scholar and gentleman. Much appreciated, thanks.

  2. David Weller says:

    Hi Ravi! I just wanted to say a huge thank you, not just for Primepress, but for the support you have here on the site.

    I’ve spent hours of my life looking at themes, and trying in vain to customize them (I’m a complete HTML / CSS newbie), but yours is the first design that I’m truly happy with – and I’ve been able to alter it exactly how I wanted!

    So thanks again, and all the best.

    David

    1. Gouri says:

      Totally agree with David, even the support has been extraordinary!!

    2. Insurance says:

      Its nice theme. I installed it on my blog today. Thanks.

  3. Matt says:

    Ravi, thanks man – I appreciate the support.

    Everything that you have done satisfies what was asked. I guess I just need one more piece of advice – I would like my homepage to view like one of the category pages.

    On my site, when you click on one of the categories in the sidebar – you get a pages with a brief description of all blog posts, then a tri-dot [...] to go to the entire post.

    The reason I would like this, is because blog page, now, shows the entire post, but it leaves out important footer functions (like, comments, etc…). From a functionality standpoint, I think this would be best.

    I hope I’ve been specific and not confusing. I appreciate your work and am pleased to keep your name and link in the credits on the bottom of the page.

    I’m not asking for a re-write, just a pointer in the right direction so that I may make the changes myself.

    Thanks again!
    Matt

  4. Kim says:

    Hi Ravi,

    I love your theme and have been thinking about using a static page so thanks for these instructions. I’m also planning to use the blog to power my domain and will be following these instructions here to do that:
    http://www.queenofkludge.com/power-your-domain-with-wordpress/

    My question is, will these instructions work with your static home page tips or do you think I would run into problems doing this?

    Thanks so much!

  5. Ravi Varma says:

    @Christiaan and David
    Thank you guys, for taking the time to show your appreciation. That adds a lot to my motivation.

    @Matt
    Thank you Matt,
    Current scenario – In your current setup both the homepage and the blog page are governed by the same theme template file ie index.php

    Requirement – From what I understand, you want to show your blog posts on your blog page and on the homepage as well. The only difference being, you want to show excerpts on your home while showing full content on the blog Page.

    There are many ways to achieving this functionality and here’s one.
    1. create a new file and name it home.php
    2. copy over the contents of the index.php into home.php
    3. In the new home.php find and replace the_content with the_excerpt
    3. place the home.php file in your theme directory.
    Now, WordPress uses a different template file home.php for homepage.

    @Kim
    Thanks Kim,
    Moving WordPress to its on directory and these tips not inter-dependent, so they should work fine. A small advise, I suggest you also read this, because depending on your permalinks setup an additional file (.htaccess) also needs to be copied along with the index.php.

    1. Toby Barnett says:

      Hi Ravi,

      I landed here via a Google search for blog posting on static homepage. I am building a site for a friend, http://www.mikebeck4homes.com/, and using the static homepage feature inside WordPress and pointing the blog postings to their own blog page.

      What I am trying to do is get the latest two entries to display at the bottom of the home page but the more I try to use code and add it into the page template the more syntax errors arise. Is there a way just call in the via .php code in the page template file?

      I have also tried SimplePie WordPress plugin (as a early commenter mentioned with no luck). Any insight you have I would be most grateful. Thanks!

  6. Matt says:

    Ravi,

    Thank you SO much! Your support has been great. Everything I’ve commented on has been addressed.

    Take care,

    Matt

  7. Kim says:

    Ravi,

    Thanks for your reply. One other question – I noticed that when I add a widget to sidebar 2 that the ‘Page’ and ‘Links’ sections then disappear. When I add it to sidebar 1, everything works fine. How do you control this?

  8. Dirk says:

    Hi Ravi,

    congratulations on your theme. This is just brilliant, and I have really looked at many different themes before deciding on yours.

    As I am fairly new to CSS/PHP and WordPress, I wondered if you already have created some template pages with a) just one sidebar and b) without any sidebar. Three columns are a bit too much for my liking for some pages where I want to add a forum and one where I want to include an Amazon a-store.

    Sorry if this is “newbie” stuff, but maybe you have already created such templates, so I don’t need to tweak and potentially destroy your design. Any help greatly appreciated

    Dirk

  9. Franky says:

    Hi Ravi

    I’ve just implemented your Theme and I love it !
    I just have a problem with the nextgen gallery, the pictures are not showed as thumnails. they just apper as lines…

    Do you ever heared about that problem and can help me ?

    I don’t wanna change the theme !

    Many thanks from Switzerland
    Frankys

  10. Ravi Varma says:

    @Kim
    Hi Kim,
    That’s how sidebar widgets work. The stuff you see in the sidebar, when you don’t add any widgets, are like placeholders (instead of leaving the sidebars blank). The moment you add (drag and drop) any widget to any of the sidebars, the default setup is overridden and only the ones you select are shown.

    @Dirk
    Thank you Dirk,
    I did make a quick Page template with no-sidebars. Though there isn’t one with a single sidebar yet, you can expect one very soon.

    @Franky
    Thanks Franky. I tested the NextGEN Gallery and found it working as intended. I’ve also seen other sites using the gallery on PrimePress without any problems. Problem could be something else, I’ll take a look if you can gimme a link.

  11. Dirk says:

    Ravi,

    thanks a lot, didn’t see this before. This is great.

    Looking forward to the 1-sidebar-template. I did manage to tweak the theme so that only one-sidebar is displayed, but then again I do think the 2-sidebar design is great for some pages… So I would prefer to choose per side, rather than change the default…

  12. Brett says:

    Ravi,

    This may be a general WordPress question but thought you may know the answer…

    Is there a way to not show the Page Header on the homepage – but have it available on others? For instance, my homepage is a static page named “Home” and when you click on it it says “Home” at the top of the page. I’d like this not to appear if possible. Thanks!

    Brett

  13. That this was so easy….
    Who would have thought , many thanks ravi!

    FYI a direct url ( for the WordPress novices … ) is : /wp-admin/options-reading.php

  14. Donna says:

    I am new to WordPress and love your theme. I have looked at many and keep coming back to yours – that makes it a keeper.

    I am hoping to replace my current website with the wordpress site and want to start with a static homepage.

    I followed your instructions but got stuck at editting the main-menu.php. I am not sure what to do with the code that you give. Can you please help me out?

    Many thanks in advance

  15. Ian Young says:

    Hi
    Used your suggestion for setting up static page. Only thing is that “home” now has the page id. I did this in an earlier version of WordPress and the home link goes to the static page as if it were the index page. Problem is, I cannot remember how I did it!
    Also used the plugin that you suggested for page ordering. Didn’t work and neither has manual ordering – version 2.7.

    Any thoughts?

    Ian

  16. Ian Young says:

    Ahh. Found the solution on the mypageorder site.
    Rewrote the menu page with
    wp_list_pages(‘sort_column=menu_order&title_li=’);

    Now both problems sorted.

    Apologies for any inconvenience

    Cheers

    Ian

  17. Mike says:

    Ravi,

    Thanks for everything! I noticed your recommended page ordering plugin isn’t updated for 2.7. I have tested this one, and found that it works great with a drag and drop way to order pages in 2.7.

    http://wordpress.org/extend/plugins/my-page-order/

    Mike

  18. Mike says:

    The ‘HomePage’ template is great. However, how do I get comments enabled on that page?

    Thanks!

  19. [...] own page and create a static page (within WordPress) that you will set as your default home page. Click here for a good way to do that right within the WordPress admin [...]

  20. Jose Martinez says:

    Hello,

    I have followed the instructions above word for word but for some reason on my front page, it only shows the home page that I chose but does not show my blog posts. Can you please help? Thanks.

  21. Donna Amos says:

    Okay I have two home pages and they do not have a numerical id so I can exclude one of them. Help

  22. metin2 says:

    it only shows the home page that I chose but does not show my blog posts

  23. 3g modem says:

    it only shows the home page that I chose

  24. best site for machines

  25. metal müzik says:

    metal müzik sitesi rock müzik sitesi grup biyografileri.

    ve ayrıca sayın administrator thanks you

  26. [...] He even went so far as to create a forum to respond to questions about Prime Press. Example post: Setting up the WordPress static homepage 5. Blogstorm- Patrick is great at responding to queries of the online marketing persuasion in the [...]

  27. Tero says:

    I have the following problem with PrimePress theme: I’m using two sidebar configuration and while that looks perfectly fine in most browsers (Chrome, Firefox, IE8), for some mysterious reason IE6 and IE7 place the sidebars on top of each other. Not side by side as intended. Does anyone have an idea what causes this and how it can be fixed? Could it have something to do with the content that I have placed into the sidebars?

  28. Smith says:

    Thank you! for your support.

  29. Net Success says:

    Thanks Ravi! I will try this method and see if it works. I think static pages look more professional than just a blog page.

  30. [...] He even went so far as to create a forum to respond to questions about Prime Press. Example post: Setting up the WordPress static homepage 5. Blogstorm- Patrick is great at responding to queries of the online marketing persuasion in the [...]

  31. kiki says:

    hi there and thank you for this useful post.
    In my case, the drop down list of the available page templates displays only the “default template” and the custom template I created “mytemplate”.

    There is no “blog”, “archives”… etc displaying. Have I done something wrong?

  32. Havuz says:

    thanks for useful and meaningful articleaa.

  33. Jeff says:

    Thanks for this great post, Ravi.

    For some of my sites I’m using magazine-style themes but it’s still a hassle to manage if you want a static front page.

    I’ll definitely follow your advice for my next project, which is not supposed to look blog-like. I’ll separate static and dynamic content as you suggested.

    Thanks again,
    Jeff

  34. Internet Explorer 8 is very good because it is as stable as Opera. I hate the previous versions of IE like IE6 because it hangs frequently. ‘

  35. Internet Explorer 8 have been my most used browser this year, it is definitely stable and fast loading too. “

  36. pip says:

    Thank you, thank you, a thousand thank yous. That little piece of code did the trick! (or the removal of it!) Removing the duplicate page from the navigation bar is now done. You are a life saver.

  37. Thank you for this information.

    I tried this method and it worked great :)

  38. very good admin boy

  39. alamin says:

    Great post also! Your writing is so fresh in comparison to most other bloggers. Thanks for writing when you get the chance to, I’ll be sure to keep visiting!

    Thanks
    Md.Alamin Khan

  40. liton says:

    Great article on social media. This article points out some good information about how social media is a big factor on business

    Thanks
    Liton mia

  41. 麦艾艾商场 情侣装专卖店

  42. bivian says:

    Your article seems interesting, i have noted it my digg and stumble account.The point you are making is easy to understand and effective. I have blog site for SEO, Art,Shopping.

    Thanks
    bivian tilma

  43. romal says:

    Hello there ,
    this is a very interesting article. I tell you that the subject is more profound that appear. Believe me !!! Very good site.Keep it up.I liked the look and feel of ur site. . I have many blog site for Link, directory,Hosting
    ,Sports and much more.

    Best of luck
    Romel Naan

  44. [...] He even went so far as to create a forum to respond to questions about Prime Press. Example post: Setting up the WordPress static homepage 5. Blogstorm- Patrick is great at responding to queries of the online marketing persuasion in the [...]

  45. Matbaa says:

    Very good information, thank you

  46. This is a great post, information that we can all use! Thanks!

  47. deepu says:

    good………….

  48. Arison says:

    Cat blogs are for, by, and about the person blogging

  49. hearty thanks for the information. don ‘t get it

  50. saç modası says:

    hearty thanks for the information. don ‘t get it

  51. PH Test says:

    new homes these days are made of energy efficient insulations and most of them use environment friendly materials too `.’

  52. seda says:

    In my case, the drop down list of the available page templates displays only the “default template” and the custom

  53. I have found this tutorial really useful. Thanks, it saves me a lot of time

  54. I like your post and loved to read it. It the great source of inforation for us and that is why people like you and appreciate your work…Keep rocking…..!!!

  55. Shiva says:

    I’d like to add first that, I’m a total new-bie to everything concerning blogging. I don’t know the term css styles, and every new parameters that they call it here. So, please help me out here.
    My problem is this: I wanted a static home page, because by default, in wordpress my home page consists of my recent posts. But, I would like a static post. So, I got to this page by googling about my problem. What I don’t understand in your solution is that, you have asked me to change the template of my page as “blog”, in your step 2. But I don’t have that, it has only two options, default template, and showcase template.
    Please, help me out, I don’t have a solution, and can’t proceed without your answer.
    And, Im using a Macbook, for your information. I can’t use the word press application even. Too much bad news from my side. Sorry. Please help.

  • Recommended Host

    If you are looking for a good web-host, Dreamhost is among the best out there. Apart from the great stuff they offer, Dreamhost's got a hassle-free hosting environemnt ideal for WordPress. Type in PRIMEPRESS as the promo code to save US$50 while signing-up.