Need Some Quick Help - Custom Url Structure

Discussion in 'WordPress' started by Boomer222, Aug 4, 2008.

  1. #1
    Hey all,

    I'm really stuck on something basic. I'm trying to set this custom url structure in Wordpress... www.mysite.com/2008/08/my_latest_blog_post.html

    But I'm lost on how to achieve the underscores. I know it's a variation of this /%year%/%monthnum%/%day%/%postname%.html?

    How do I write the %postname% so I know the post will be separated by underscores?

    I'm just going around in circles with the info I've been finding. Can anyone help me out on this? Thanks in advance.
     
    Boomer222, Aug 4, 2008 IP
  2. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #2
    %postname%
    just add above, wordpress will add underscore by itself when there are spaces between the words ;)
     
    MeetHere, Aug 4, 2008 IP
  3. Boomer222

    Boomer222 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Perfect. Thanks for responding, I really appreciate it. I can finally move forward. :D
     
    Boomer222, Aug 4, 2008 IP
  4. Boomer222

    Boomer222 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks again for the info, but I'm back to square one. When I use %postname%, it's putting in dashes. I've been sitting at the front gates of WP after the install for two nights. I'm good to go on all other aspects.

    Can anyone help me achieve this url structure so I can move forward... I just need the underscores instead of dashes... www.mysite.com/2008/08/my_latest_blog_post.html

    Is it something I need to hard code somewhere? Or is it just a different %command%?

    Thanks again... any help at all would be greatly appreciated.
     
    Boomer222, Aug 5, 2008 IP
  5. ozan

    ozan Peon

    Messages:
    82
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There isn't a straightforward solution to this, because nobody at WordPress could have guessed that you'd need underscores instead of en-dashes. Speaking of which, why do you need underscores instead of en-dashes? I hope nobody's convinced you that it's somehow better for SEO purposes.

    By the way what you want can be obtained by tinkering with .htaccess. If you really need to do this, we can show you how.
     
    ozan, Aug 5, 2008 IP
  6. MeetHere

    MeetHere Prominent Member

    Messages:
    15,399
    Likes Received:
    994
    Best Answers:
    0
    Trophy Points:
    330
    #6
    There is no problem or no advantage of dashes over underscore..
     
    MeetHere, Aug 5, 2008 IP
  7. Boomer222

    Boomer222 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks very much, I really appreciate it. Basically, I'm working offline and transferring a lot of pages from an existing site into WP. All of the pages are really well optimized and place amazingly great within Google. I'm just scared I'm going to screw it up and take a huge hit if I don't get this right. In the end, I don't have a problem going with dashes if I can maintain the same level of SEO.

    The thing is, in switching over to WP, I see many top sites clocking in at the top spots for various search terms... many using the underscore instead of the dashes. It can't be that bad, but that's just me.

    Have you encountered any downsides to using dashes as far as SEO? I know it's the accepted norm, but...
     
    Boomer222, Aug 5, 2008 IP
  8. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #8
    wordpress custom url permalinks:

    /%category%/%postname%/
    /%category%/%postname%.html
     
    Jalpari, Aug 9, 2008 IP
  9. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #9
    WordPress adds the "-" where spaces are if you don't specify your Post Slug manually. I'm sure you can look through the WordPress files and find where it occurs and change the "-" to "_" though.
     
    mizaks, Aug 9, 2008 IP
  10. Houdy

    Houdy Peon

    Messages:
    267
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #10
    For the existing pages you are porting over put the underscores in manually by specifying the post slug. Just put the "my_latest_blog_post" part in the post slug but keep %postname% part in the permalink structure. WP will pick up the %postname% from the title of the post and use dashes for spaces if you don't specify a post slug. But will use whatever you specify in the post slug, I tired it and it works on 2.6.

    For any new posts or pages I wouldn't worry about what it is from then on it really doesn't matter.
     
    Houdy, Aug 9, 2008 IP