Posted By

racl101 on 01/20/11


php wordpress

Versions (?)

How to obtain current page permalink url from a function on call on a page template and not from inside the Loop?

 / Published in: PHP


I got the answer to this question on WordPress Stack Exchange website:

  1. // call get_page_link($post->ID)
  2. // where $post-is a WordPress variable and needs to be global if called from inside a function.
  3. get_page_link($post->ID);

Report this snippet  


RSS Icon Subscribe to comments
Posted By: PedroW on November 8, 2018

Thank you very much. I used a similar tactic when developing this site top shows in vegas. Almost the same keys used

Posted By: jonsnow on November 28, 2019

buy british shorthair buy british shorthair cat buy a british shorthair kitten where to buy british shorthair kittens where can i buy a british shorthair kitten buy british shorthair kitten usa,cheap british shorthair kittens buy british blue shorthair kitten buy british shorthair cat london buy british shorthair kitten london buy british shorthair london buy british shorthair melbourne buy british blue shorthair cat buy british shorthair blue British shorthair kittens for adoption

You need to login to post a comment.