WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks (17 posts)

  1. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

    It looks like you modified the templates so the correct anchors are no longer being generated. Check out the original template, particularly the div with id="post-$ID".

  2. Graham
    Member
    Posted 11 years ago #

    I thought wordpress was going to use the kind of permalinks like b2 can be modified to use, eg: http://www.mydomain.com/archives/p/1 ect ect

  3. Anonymous
    Unregistered
    Posted 11 years ago #

    eeeek i really do not this whole bbcode thing... i mean:
    ?php permalink_anchor() ;? enclosed in the usual < > characters

  4. mike
    Member
    Posted 11 years ago #

    Thanks! I must have deleted that piece of code.

  5. Michael Heilemann
    Member
    Posted 11 years ago #

    I think this is actually entirely missing from the template... I can't get it working anyway.

  6. spikedrabbit
    Member
    Posted 11 years ago #

    Eudaimic is correct, the permalink anchor code is missing from the default template that WP comes with.

  7. Anonymous
    Unregistered
    Posted 11 years ago #

    Sorry, I meant, change index.php to:
    <h3 class="storytitle"><br>
    "><br>
    " rel="bookmark"><?php
    the_title(); ?>
    <br>
    <span class="meta">
    ?>" title="Category: <?php the_category() ?>">[<?php
    the_category() ?>]
    <br>
    </span><br>
    </h3>

  8. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

    There's already a function that echos out the ID, the_ID(). Use that instead.

  9. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

    This has been corrected in the CVS. I would not recommend the above method. The correct way is to change the h3 story title to <h3 class="storytitle" id="post-<?php the_ID(); ?>">. The post- is important for the anchors to be valid XHTML. Check out the new template function in the CVS as well.

  10. idiotprogrammer
    Member
    Posted 11 years ago #

    Gosh, what's the secret for putting code in a minibb post?

  11. idiotprogrammer
    Member
    Posted 11 years ago #

    Gosh, perhaps my previous post wasn't too clear. I think minibb chewed up some of my post.
    I used the cvs code, all the code between the start h3 and end h3.
    In my output, the id=post-22 while the a href is equal to a href="index.php?m=200306#22″
    There seems to be a mismatch. And btw, why is post- necessary for validation? rj

  12. Mike Little
    Member
    Posted 11 years ago #

    The reason for having the post- in front of the id is that in CSS1 Id could not begin with digits. THe restriction has been lifted for CSS2 but... *shrugs*
    Anyway, I have this code in my template
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">
    " rel="bookmark"><?php the_title(); ?>
    </h3>
    which results in the following xhtml
    <h3 class="storytitle" id="post-1">
    Hello world!
    </h3>
    Mike

  13. jonanhold
    Member
    Posted 11 years ago #

    Mike,
    The same template code here results in:
    ...

    as opposed to #post-12
    -j

  14. idiotprogrammer
    Member
    Posted 11 years ago #

    Sorry, to be a pain, Mike L, but how did you get your code in miniBB?

  15. Anonymous
    Unregistered
    Posted 11 years ago #

    Mike, if I'm implementing the htaccess-lovely-urls, this wouldn't be a big concern right?

  16. Mike Little
    Member
    Posted 11 years ago #

    Ok, firstly an apology, I hadn't realised that the fix to make these css1 compliant id's was put into CVS *after* the last release. Sorry :-(
    The diffs to fix this are here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cafelog/wordpress/b2-include/b2template.functions.php.diff?r1=1.20&r2=1.21
    Secondly, in order to put code in miniBB I just replace all the < with ampersand lt semi-colon and all the > with ampersand gt semi-colon
    Thirdly, looking at the function it does use the correct code to allow for friendly urls
    Mike

  17. idiotprogrammer
    Member
    Posted 11 years ago #

    works great. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.