can someone help me with this little hack please

Discussion in 'WordPress' started by iamsgf, Jun 19, 2008.

  1. #1
    Hi all,

    I have implimented a 'Most Recent Posts' block on my wordpress MU setup and all is working well except for 1 thing. An this is the links are not actually showing the Permalinks but just the standard links. I believe it is something to do with these line:

    echo '<li><a href="' . $allposts[$i]['fullurl'];
    echo '" title="';
    echo $author;
    echo '">';
    echo $url;
    echo '</a>';
    echo '</li>';

    can someone help me and let me know what i need to change for it so have the permalinks as the a href. it is for http://megablogs.net

    thanks
     
    iamsgf, Jun 19, 2008 IP
  2. iamsgf

    iamsgf Active Member

    Messages:
    982
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    85
    #2
    ok so I have realised that it I change the 'fullurl' to Title then it puts in the title text, but it has spaces in it. How would I get the spaces to convert to -

    :)
     
    iamsgf, Jun 19, 2008 IP
  3. zeldaze

    zeldaze Active Member

    Messages:
    311
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #3
    
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    
    Code (markup):
    That is the correct way to link the the permalink in WP 2.5.1
     
    zeldaze, Jun 19, 2008 IP