WordPress.org

Forums

[resolved] Detect, Use, Echo page ID (4 posts)

  1. SkunkHunt
    Member
    Posted 6 years ago #

    I'm simply attempting to echo the current page_id into my press. It's not showing up.

    I've tried every example in the Codex and nothing works.

    I've even tried echoing simple text into the widget and it breaks silently or my code shows up exposed on the page.

    Very frustrating. I can echo text and/or variables on my own PHP pages but for whatever reason (that I couldn't find an explanation for in the Codex) I am unable to echo into a widget block (or any page for that matter).

    Please, anything as long as it works

  2. SkunkHunt
    Member
    Posted 6 years ago #

    <?php echo "blah"; ?>

    doesn't seem to work at all

  3. iridiax
    Member
    Posted 6 years ago #

    You need a plugin to use php in WordPress content (outside of the theme templates).

    http://wordpress.org/extend/plugins/search.php?q=php

  4. SkunkHunt
    Member
    Posted 6 years ago #

    Thanks! That was easy enough

Topic Closed

This topic has been closed to new replies.

About this Topic