SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru SG1's Avatar
    Join Date
    Jul 2005
    Location
    Virginia, USA.
    Posts
    877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to set the url of my WP site to /blog

    I am using Wordpress to power my website. How do I ensure that this url; www.mydomain.com/blog will list my latest blog entries? As of this time, when I type that in, a blank page shows up.

    I went into the permalinks settings and set a custom structure of this; /blog/%year%/%monthnum%/%day%/%postname%/

    but that won't get the latest entries to show up?

    I then tried setting the blog address url to www.mydomain.com/blog instead of www.mydomain.com in addition to the custom structure above. But that doesn't work quite right because now my entries are like this; www.domain.com/blog/blog/2008/03/07/blog-entry-title

    Thoughts?

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is WP installed in a directory (named blog) in the root of your server? If not this is the way to do it.

  3. #3
    SitePoint Zealot shaeldl's Avatar
    Join Date
    Jan 2008
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many webmasters suggest a yourdomain.com/%postname%/ format. Make sure you specified/created the subfolder name where you installed WP.

  4. #4
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Johnny Gulag View Post
    Is WP installed in a directory (named blog) in the root of your server? If not this is the way to do it.
    No. That wouldn't work at all as then all of the pages/posts would move to domain.com/blog/... instead of domain.com/...

    You need to change the "Blog address (URL)" under settings in your admin panel. That will add your latest blog posts to domain.com/blog/.

    EDIT: Don't change "WordPress address (URL)" as that needs to be where you have WordPress installed.

  5. #5
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ryanhellyer View Post
    No. That wouldn't work at all as then all of the pages/posts would move to domain.com/blog/... instead of domain.com/...
    I think that is what he is asking, is it not?

    The only other thing I can think of is he wants to have a 'static' home page and have the latest posts display on a page named /blog, if this is the case then under options > reading there is an option to set a page as the home page and redirect the blog posts to another page.

    To do this you first need to create the 2 pages, name one "blog" and the other "home", then you can set this under options > reading, as I mention above.

    Hope it helps.

  6. #6
    SitePoint Guru SG1's Avatar
    Join Date
    Jul 2005
    Location
    Virginia, USA.
    Posts
    877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I just want the blog posts and not the pages to move to /blog. So what Ben is suggesting would move the entire root folder and I don't want that.

    Ryan-I changed my blog address url to 'blog', but that only gives me the problem that I stated above.

    Shaeldl- I'm not sure where would one go to adjust those settings.

    I don't think what I'm suggesting is possible unless I install WP twice.

  7. #7
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What do you want on the front page, when the user goes to: http://yoursite.com/ ?

  8. #8
    SitePoint Guru SG1's Avatar
    Join Date
    Jul 2005
    Location
    Virginia, USA.
    Posts
    877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just a static page


  9. #9
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SG1 View Post
    just a static page
    Hello

    Okay, so do this:

    Create 2 new (or edit existing) pages, name one "blog" and the other "home", then under options > reading there is an option to set a static page as the "home" page and redirect the blog posts to another page, select the static page option, then in the drop downs select the 2 pages you just created the "home" page for the front page and the "blog" page for the posts page, then click update options and add the content you want to appear on the front page to the home page under manage > pages.

    This will make it so that the front page now uses page.php as its template so if this is a problem you can create a template file specifically for the "home" page.

    Hope it helps.

  10. #10
    SitePoint Guru SG1's Avatar
    Join Date
    Jul 2005
    Location
    Virginia, USA.
    Posts
    877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very cool. i totally forgot about this when i upgraded.

    but for whatever reason, the page, /blog, now breaks on me. see what i mean here.


  11. #11
    SitePoint Evangelist Redivider's Avatar
    Join Date
    Nov 2003
    Location
    PA
    Posts
    465
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems like a template issue. The main blog index and the single post/archive pages are separate php files. You're probably missing something in the main index file like a clearing div or something.

    Also, don't take this the wrong way, but you might want to look into finding a writer to help you out a bit. I would definitely not hire a design company with that kind of writing on their site.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •