WordPress.org

Ready to get started?Download WordPress

Forums

Simple messages to the user from a plugin (2 posts)

  1. buchannon
    Member
    Posted 6 years ago #

    I've made a bunch of wordpress plugins but I still can't seem to figure out how to display a message just once only using a plugin (no theme editing).

    Lets say I do some $_GET and $_POST checking with the 'init' action hook, then want to display some text, in a variable $output, after those checks. If you simply echo $output inside of the function init calls, IE renders an error because all the output is before the <!DOCTYPE tag.

    I can't seem to find an action or filter that I can pass $output to so that it displays the output only once, outside of the loop, after the header information. Any ideas? Thanks...

    <---header--->
    <---my message--->
    <---the loop--->
    <---other included files--->

  2. buchannon
    Member
    Posted 6 years ago #

    I guess this really can't be done without just calling the plugin function from within the theme?

Topic Closed

This topic has been closed to new replies.

About this Topic