tryscer
Member
Posted 7 years ago #
Hey,
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?
Thanks,
J
tryscer
Member
Posted 7 years ago #
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?
tryscer
Member
Posted 7 years ago #
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.
tryscer
Member
Posted 7 years ago #
Solved it!
If anyone's interested -- I used $id instead of permalink_anchor and it works fine. Thanks a lot!