• I’m using an installation of WordPress to organize my thoughts for a business plan (which investors will be able to browse online) rather than an ordinary blog.

    As such, I need the main page of the blog to be static — to always show the same post on the main page.

    What would be the most effective way to modify my index template so that it only shows a particular post, rather than the last 10 or so posts?

    I’ve considered making all my other posts as “pages” rather than posts, but there is no way to designate categories for pages, so that’s not a good solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • There’s a page in the WordPress codex about how to do that.

    I recommend my own plugin that will make any page of your choice the static page.

    I created a home.php file, and when altering this file in WordPress, I found that alterations were shown as I open up the to the home directory of that installation.

    I thought that creating this page would not do anything until I followed the intructions that filosofo includes with his plug in – it was reading some of that which must have prompted me to create the home.php file, I don’t know php but can copy and paste and alter little bits of it.

    I thought that just pointing my url address to the home.php file would sort out a ‘homepage’ for me, and that to create the home page I’d just copy the index page, and add anything I needed.

    I guess I’ll be trying this plug in in about a minutes time.

    Cheers.

    Edited –

    Ah, it was your page which prompted me to do the home.php, which does work, but you’d need to take out the loop (I think) which brings the posts to that page.

    I guess I want WordPress as a sort of CMS to make it easier to maintain websites and to structure all websites on.

    For most people the plug in is the way to go, but I’m already deep into this messing with the php and will keep my home page.

    Many times on home.php file I use this plugin:
    https://guff.szub.net/2005/01/27/get-a-post/

    I like this solution because:
    – it gives me the flexibility to handcode the home.php as I want
    – but I can choose a post or Page to be displayed in the way I want
    – and the content can always be edited from the admin panel

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Static Main Page’ is closed to new replies.