Support » Themes and Templates » Static WordPress “Page” as Landing Page for Site

  • After an exhaustive search through the archives, I’m at a loss and am in need of guidance. Oh and I can get wordy so bear with me please, this is my effort to be complete. My site is here: http://www.marcnjami.com

    Goal: Make a wordpress page that functions as a landing page for my site, (kinda CMS like) but do this in a manner so I can still leverage the native index.php for my blog. I’m also trying to touch the core wordpress files as little as possible so it is easier to maintain and I can leverage this theme on different sites. When I get this solved I can promote wordpress to my root directory and complete the total transition to wordpress. Yea!!!!

    Progress: My theme is coming along nicely and I nice archives page. I also have successfully integrated Gallery2 into wordpress. I have created the page and basic template I want to use as the “landing� page (i.e. http://www.marcnjami.com/wordpress/?page_id=1). I have tried various solutions such as Ryan’s pagetofront plug-in, renaming my home page template to home.php to leverage the wordpress template hierarchy and Alex’s WordPress as a CMS hacks. Oh and I’ve done a truckload of reading and research.

    Problem: I need to accomplish this in a platform independent way without using permalinks or url rewrites because I leverage a W.I.M.P. platform and hence no apache. With any of the above solutions I can’t seem to access the index.php page directly. If you go to my site you will notice the horizontal navigation bar under the header. From an end user perspective when I click on home (or go to http://www.marcnjami.com/wordpress/ for that matter), I want to go to above mentioned “static� page. When I click on “is this a weblog?� I want to arrive at my blog (i.e. index.php).

    Any thoughts on how I might be able to get this to work? Oh and I play in the shallow end of the pool when it comes to php so be easy on me. Lol…

Viewing 15 replies - 1 through 15 (of 23 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    I stand by my home.php as front page solution but it needs to be implemented correctly. By the look of things you have bits of your set up in a sub directory. Using home.php that is unnecessary. That way any click on a link will go by default to index php or down the hierarchy if you have other templates installed. All you need do then is tweak the blog link on home.php to a slightly different url.

    Thread Starter ClimbingMonkey

    (@climbingmonkey)

    macmanx – So I have already taken a look at the Semilogic plugin. From a quick glance it seems to me that it does the exact same thing as Ryan’s page-to-front plugin. it just looks for a page slug instead of an ID. Am I wrong?

    root – you are right. I currently have an “entry” page in the root of my web and wordpress and gallery installed in subdirectories. My goal is to have a wordpress managed “entry” page so I can promote my wordpress dir to the root. So are you saying that I use home.php as my front page and rename my index.php file to something else? I don’t think I’m quite understanding your point…

    You would save index php as home php. So now you have 2 files. At the moment they would be identical. The difference is the way they load. A call to your url will bring up home php (your new home page). Any other click brings up index php. So now any changes you make to home.php do not affect the remainder of your blog. You can edit the loop, swap CSS, add / subtract columns – dispense with posts – whatever in home.php. As to urls the Home url in your nav needs to be the domain url and the Blog link needs to point to /index.php specifically. Really simple. No redirects. No plugins. No hacks. No conditional php. See my blog for a live example.

    Any other click brings up index php
    Root, one thing to note – as far as I can tell, if you use the next/previous page links on home.php, page2 etc still calls home.php and not index.php.

    That would make sense.

    Thread Starter ClimbingMonkey

    (@climbingmonkey)

    Okay, I have done as you suggested. Same problem…

    I renamed my homepage.php template to home.php (I had already tried this btw) If you go to my wordpress 1.5 install: wordpress you can now see my “landing page.” Now try this url: index.php . You see the issue? The templating system has a built in hierarchy that tells it to load home if is available, if not load index. Since I have a home.php in my template dir it will never load index.php!

    It my issue clearer now? Oh and I’ve also tried renaming my index.php page to blog.php and I get nothing but a blank page.

    What am I missing?

    Riiiight…. index.php will be used when you start viewing individual posts, or go into the categories, or the archives….. If you go straight into index.php, you haven’t specified a specific post or anything to view, so it loads home.php by default….

    Which, if you think about it, makes sense. as http://mysite.com/ is the same as http://mysite.com/index.php

    Tg

    Thread Starter ClimbingMonkey

    (@climbingmonkey)

    Absolutely… Makes perfect sense. So can I create a page that will display all my posts (the same functionality as index.php)? I have tried to copy index.php -> blog.php and then I called the rewind function at the beginning of the page and still no luck getting all my posts. As I stated earlier I play in the shallow end of the php pool, so I’m learning as I go along! 🙂

    Well now you just need to edit home php. Seems to be working fine unless I am missing something.They look the same because they re the same. Alternatively as I indicated in my post and others have picked up you need to edit the url to point to index.But the template hierarchy only kicks in if no file is specified. index php should do it. IMHO.

    Thread Starter ClimbingMonkey

    (@climbingmonkey)

    My home and index files are different…

    Home is a customized page template I made that only loads the content of page one and customized wide nav bar. Index loads a list of all my posts, the standard sidebar, in typical blog format.

    With a home.php and an index.php in my wordpress theme directory, when I change the link to point to index.php directly, the templating heirachy is seeming to kick in and still uses the layout and content contained in the home.php file. It sees http://mysite.com/ the same as http://mysite.com/index.php and then it says yep this “is_home()” go ahead and use the home.php cause it is there… 🙂

    I see what you are trying to say but in my experience the template hierarchy does kicks in even if I specify a link to index.php directly. Bummer…

    Well Ok – just think a bit. Alter the url for the blog (index) to include a cat for example.

    Thread Starter ClimbingMonkey

    (@climbingmonkey)

    I figured it out… I needed to add home.php to my list of default documents (in IIS) for my wordpress directory. It was setup to load home first BEFORE index.php. This was the key…

    So I configed the directory in IIS, and copied my homepage file to home.php in the root of wordpress. It sat next to my gallery2 integration file and my archives page. That did the trick.

    See for yourself: http://www.marcnjami.com/wordpress/

    Thanks much for your patience 🙂

    If I click the links in activity, they don’t do anything other than refresh the page. I take it they should display the posts?

    Well you never mentioned IIS :). Glad you got fixed up.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Static WordPress “Page” as Landing Page for Site’ is closed to new replies.