get_permalink() not working in widget?
I use “PHP code”-plugin to use php code in my widget.
I’m trying to get the url of the current page.
<?php echo get_permalink(); ?>
However, the result is empty. Why does the function not get the current url? Are there alternatives?
- The topic ‘get_permalink() not working in widget?’ is closed to new replies.