Support » Fixing WordPress » Different urls for same item: how to stop?

  • Resolved vavroom


    I’ve just spent a frustrating couple hours trying to figure this one out. I can’t seem to find an answer to my trouble, and I hope someone will know how to help out.

    I’m using pretty urls. And I’m getting two different URIs for an individual post, depending on how I’m loading the page.

    If I click on the title, I would get a link such as / But if I click on the read more link, I get /

    Obviously 78 is the post ID. I want the URI to be the same, regardless of how the visitor gets to that page.

    I’m not sure how to modify the readmore function, or if that’s even the thing I need to modify. Any ideas would be greatly appreciated.

    Here’s the bit of code that brings the offending behaviour:

    <h3>” rel=”bookmark”><?php the_title(); ?></h3>
    <div class=”storycontent”>
    <?php the_content(“Continue reading the ” . the_title(”, ”, false) . ” article”); ?>

    The previous obviously lives in the Loop 🙂

    Thanks again for any assistance.

    p.s. I can’t seem to be able to post the code without the system munging it all up. Frustration. It’s 3am, I’m going to bed, I’ll try to figure out how to post code without it getting munged after I slept some.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The URI is the same – it’s just that the second one (with more) adds an anchor making you to jump NOT to the beginning of the post but to the point where the “more” tag was inserted.

    EDIT. When will people learn how to post a few lines of code…? <sigh>

    Thanks for the explanation moshu. Absolutely obvious. Silly me. 😮 Serves me right for working so late. Feel free to ditch the entire thread if you want, waste of space! LOL. Night

    EDIT: We’ll learn to post a few lines of code when there’s easy to find and clear instructions on how to use the tags on this system. I don’t mean to whine, but “Put code in between backticks” is exactly what I’ve been doing, to no avail. <shrug> I’m off

    It doesn’t say put THE WORD “code” in backticks… but THE CODE itself 😉
    (prefereably no blank lines in the code – and it will work)

    moshu, thanks for that explanation. Adding the word “itself” in that one liner would make a world of difference. In a world of SMF, vBulletin, and many other forum systems that use BB code, similar to html, in that you use an actual tag before and after the code, this makes a difference.

    I must admit, I was tired last night, but I also got upset. Your comment wasn’t very friendly. Considering that a) English isn’t my first language (despite appearances), and b) I had only a handful of post here, instead of a sarcastic comment, and explanation would have been more welcome.

    In any case, my original question has been answered, and I now know how to insert code

    <code>This is some code</code>


    (English isn’t Moshu’s first language either. Read with positive intent)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Different urls for same item: how to stop?’ is closed to new replies.