Support » Fixing WordPress » permalink_anchor() Returns Nothing

  • Resolved tryscer


    When I ask for permalink_anchor() (placed correctly within the Loop) from a Page template, it returns ”. I don’t have any permalink customizations on. permalink_anchor(id) doesn’t work either. get_permalink() put in the same place in the code work correctly.

    Any ideas?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Also, if that helps — I’m running WordPress 1.5 and this tag returns nothing on any kind of page, not just Pages.

    I don’t know why permalink_anchor doesn’t work for you. Is there any reason you couldn’t just use <a href="<?php the_permalink(); ?>">permalink</a>? Or have you already tried that?

    Thanks for the reply. No, the_permalink won’t work for me — what I’m trying to do is to have under each Page the Pages it fathers. What I was trying to do is put

    ‘<?php wp_list_pages(‘title_li=&child_of=permalink_anchor()’); ?>’

    But that doesn’t display anything. Next, I tried

    ‘<?php $var1 = permalink_anchor(); echo $var1; ?> ‘

    But that returns nothing just the same.

    Solved it!

    If anyone’s interested — I used $id instead of permalink_anchor and it works fine. Thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘permalink_anchor() Returns Nothing’ is closed to new replies.