WordPress.org

Ready to get started?Download WordPress

Forums

get_permalink() not working in widget? (1 post)

  1. boah123
    Member
    Posted 3 years ago #

    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?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.