Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter maelga

    (@maelga)

    …to dynamically get the url of a page using:

    “…

    Thread Starter maelga

    (@maelga)

    I can’t get the code to show, but it is using href get_permalink(1234) to retrieve url of page id 1234

    Plugin Author WillBontrager

    (@willbontrager)

    Unfortunately, Insert PHP works only in posts and pages.

    I don’t know how you would use PHP in the sidebar without updating the template. Maybe a search will find a plugin to do the job.

    Will

    Is there any plans to get it to work in widgets?

    If not then an alternative then is PHP Code Widget

    • This reply was modified 7 years, 9 months ago by GregW.
    Plugin Author WillBontrager

    (@willbontrager)

    No, there are no plans to do so.

    You’re welcome to make a PHP Code Widget. I would be interested in downloading it and seeing how you accomplished it.

    Will

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘php in sidebar’ is closed to new replies.