WordPress.org

Ready to get started?Download WordPress

Forums

WordPress as a CMS (31 posts)

  1. tom_raftery
    Member
    Posted 9 years ago #

    Hi all,

    I'm obviously missing something simple here. I want to use WordPress as a CMS on a site I am going to develop - so far, so good.

    However, I want mydomain.com/index.php to be the static home page created by WordPress and the WordPress blog itself to run out of mydomain.com/blog

    I can't see how to do this because any pages created by WordPress are at mydomain.com/blog/pagename

    Anyone any ideas on how to do this?

    Thanks,

    Tom

  2. lawtai
    Member
    Posted 9 years ago #

  3. tom_raftery
    Member
    Posted 9 years ago #

    Are you referring to mxtrader's solution lawtai or rboren's plugin?

    mxtrader seems to want to do what I wanted to do but his step 1 was to disable rboren's plugin!

    Thanks,

    Tom

  4. lawtai
    Member
    Posted 9 years ago #

    haha well, you could give both a try? I haven't tried this out actually, but what you want to do is possible.

  5. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

  6. tom_raftery
    Member
    Posted 9 years ago #

    Now I'm more confused than ever!

    Sorry Ryan, I don't understand how manipulating the permalink structure will do what I want to achieve.

    Can you expand a little on this?

    Thanks,

    Tom

  7. lawtai
    Member
    Posted 9 years ago #

    changing the permalink structure will allow you to easily link to your blog. if you implement the plugin that ryan wrote in the post, or try to follow mxtrader's method, one problem you'll run into is trying to link back to your blog. But if your blog is located in a subfolder, hence the different permalink structure, you'll be able to link to your blog with no problem.

  8. tom_raftery
    Member
    Posted 9 years ago #

    Ok,

    so I should abandon mxtraders method, go with Ryan's plugin, place the blog in a subfolder, and use Dougal's permalink structure?

    I still don't see how that gets me an index page at mydomain.com/ - I realise I'm being very slow here but I'm just missing something fundamental, obviously.

    I install the blog at mydomain.com/blog
    I install Ryan's plugin
    I edit the Permalink structure
    I create a Home Page using the Create Page function (isn't this placed at mydomain.com/blog/home/? - hence my confusion)

    Tom

  9. lawtai
    Member
    Posted 9 years ago #

    heh, not too sure, i'd just say give it a shot and see what happens.

  10. tom_raftery
    Member
    Posted 9 years ago #

    Ok,

    I got it to work - a slight variation on the steps outlined above.

    What I did was:
    1. Installed the blog at mydomain.com
    2. Created the Home page and noted the ID of the page
    3. Installed Ryan's plugin (editing with the correct Page ID)
    4. Edited the Permalink structure

    Hey presto, I have a site at mydomain.com and a blog at mydomain.com/blog

  11. revbob
    Member
    Posted 9 years ago #

    There is an easier and imho, better, solution -- though it's different from what you specify -- if your domain host is accommodating: I've got a main page at http://www.crispen.org/ and a blog at http://blog.crispen.org/. Just ask your domain host for a sub-domain (aka virtual host) and point blog.yourdomain.com to http://www.yourdomain.com/blog/. My domain host performs this service for free (and has a script to automate it), but when I was shopping for domain hosts, I ran into some that wanted a full monthly fee for each virtual host.

    As I said, it doesn't solve your particular set of requirements, but some folks might find it useful.

  12. lawtai
    Member
    Posted 9 years ago #

    glad it worked

  13. tom_raftery
    Member
    Posted 9 years ago #

    Thanks for the suggstion revbob.

    I could do that on my own site also, (I have an accomodating ISP!) but it wouldn't solve what I wanted to do.

    My requirement was to have a full site running out of WP - now I have, my home page is created by the Create page functionality of WP and my blog is run from the same WP db.

    And most importantly, it is in the form:
    Home Page - mydomain.com
    Blog - mydomain.com/blog

    If anyone wants to see the actual site - drop me a mail at tom at tomandpilar dot net

  14. revbob
    Member
    Posted 9 years ago #

    Ahhh, that was the part I didn't get. Brilliant idea.

  15. tom_raftery
    Member
    Posted 9 years ago #

    Guys,

    I have another issue with this.

    The site is now working fine with the home page being:
    mydomain.com

    and the blog at:
    mydomain.com/blog/

    all running out of WP 1.5 using Ryans plugin and Dougal's permalink structure.

    However, when I create a new page in the Manage Pages it gives the uri as:
    mydomain.com/new-page-name/

    This is how I would want it - however, when I go to that uri I get a 404.

    Any ideas on how I can get these pages to display and not 404?

    Thanks,

    Tom

  16. tom_raftery
    Member
    Posted 9 years ago #

    Further investigation reveals that this is somehow related to the Theme.

    Switching to the Default theme stops the 404 from occurring - but reverting to the Shaded Grey theme causes 404's to recur on the same uri!

    Bizarre or what?

  17. lawtai
    Member
    Posted 9 years ago #

    heh that's pretty weird, take a look at the pages.php file in both themes and compare the two?

  18. tom_raftery
    Member
    Posted 9 years ago #

    Ok,

    I was a little hasty. One page works in the Default theme - any I have created since don't work in the Default theme - they cause a 404.

    So, to re-cap, the problem I am having is that when I create Pages, and try to access them from the Pages menu, they 404.

    Anyone had anything like this?

    Thanks,

    Tom

  19. docker
    Member
    Posted 9 years ago #

    Here is my solution :

    1. Copy page.php -> home.php
    2. Add query_posts("page_id=2"); (where page_id is your page) before the Loop
    3. Copy index.php -> news.php and add at the top
    <?php
    /*
    Template Name: News
    */
    ?>

    And add query_posts("showposts=10"); before the Loop
    4. Make a page named News and assign template News to it

    All works fine, i think. At least for me. And all pages in sidebar lists automatically.

  20. tom_raftery
    Member
    Posted 9 years ago #

    Thanks for the response Docker

    I tried that but unfortunately the News page 404's when I try to access it!

    :-(

    Tom

  21. docker
    Member
    Posted 9 years ago #

    Hmm, can't say what's wrong, i'm not guru in php
    Did the page "News" listed in pages list ?
    First 2 steps makes the static page your home page. Is it works ?
    Next 2 steps assigns template to your page (name is not important - News, Blog, bla bla bla) wich can contain whatever - the posts re-query from database with your argumens ("showposts=10" in this case)
    May be it helps to you.

  22. docker
    Member
    Posted 9 years ago #

    oh, and i did not install ryan's plugin
    my permalink structure is /%category%/%post%/
    and i didn't change blog address

  23. tom_raftery
    Member
    Posted 9 years ago #

    Hi Docker,

    thanks for the response.

    Yes the news pageis listed in the Pages list - unfortunately clicking on it causes a 404!

    I completed steps 1 and 2 but I'm not sure if it worked! I don't think it is. I added some spurious text to home.php and it isn't showing up on the home page.

    I followed 1 and 2 precisely as you laid them out so I'm not sure why it is not working. Is it because I'm using Ryans Page To Front plugin, perhaps?

    Tom

  24. docker
    Member
    Posted 9 years ago #

    Yes, disable plugin, because when it's working, it's using page.php instead home.php

    Next, check yor preferences, may be you changed the permalink structure and blog address and wordpress address in Options, i have both "http://mysite"

  25. tom_raftery
    Member
    Posted 9 years ago #

    Docker,

    you are a star!

    That worked a treat - I have no idea why(!) but the site is now working as expected.

    Thank you, thank you, thank you.

    Tom

  26. docker
    Member
    Posted 9 years ago #

    Just resloved what this problem have another simple solution :

    http://codex.wordpress.org/Pages#Using_a_Page_as_the_Front_Page

    Just install Ryan's plugin and make a page with Archives template ;)

  27. tom_raftery
    Member
    Posted 9 years ago #

    Sorry?

    You lost me docker.

    What is the advantage of doing that over the method I have now?

    Thanks,

    Tom

  28. docker
    Member
    Posted 9 years ago #

    i just rounding there about this topic and find some parallel threads.

    I think the last have no advantages, my method have a points :
    1. you can style your homepage as you want
    2. you get a news page already styled like usual blog (by copying index.php you copy all stuff)
    Abd you don't need change permalinks and other thing.

    :) i just reflect on all this (this is my first post and i little bit verbose :)
    and sorry for my english, i m from Uzbekistan

  29. tom_raftery
    Member
    Posted 9 years ago #

    Docker,

    thanks for all the help and there is absolutely no need to apologise for your English - I understood you well enough to fix my site following your instructions and you can be sure your English is much better than my Uzbek, Russian, or Tajik!

    Cheers,

    Tom

  30. mstegink
    Member
    Posted 7 years ago #

    You could also create a home.php and then use mydomain.com/home.php as startpage and mydomain.com/index.php for blogging.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.