The MU forums have moved to WordPress.org

Way to add a plug-in page? (2 posts)

  1. gcornelisse
    Member
    Posted 14 years ago #

    I'm writing a plug-in and I need a way to add a public/frontend page that is generated by the code from a plug-in. Specifically, I'm writing a search results page that needs to be generated by the plug-in's code/logic. I really don't want to force people to hand-code anything into core WP files.

    My thought is to add a filter that processes the URL before WP can display the usual error page. I would create my own unique URL for the filter to look for.

    Has anyone done this before or know of a tutorial/article that might shed some light on the best way? How do I tell WP to access the plug-in script/code for the body content instead of throwing the error page?

    Thanks,
    Gary

  2. tmoorewp
    Member
    Posted 14 years ago #

    Try the WordPress Shortcode API. That'll let you define a function which outputs the public page with search results.

About this Topic

  • Started 14 years ago by gcornelisse
  • Latest reply from tmoorewp