IPP Europe

Create Public Pages in your Plugins

You are here:

This article is about creating custom made pages within a Plugin, to increase or personalize the page. A Public Page is known for its multiuse functionality.

Adding to Plugin Constructor

The public page is defined in the plugin constructor and afterwards as a function within the specific plugin.

					public function __construct()
        $this->slug = "test_plugin";
        $this->id = "test_plugin";
        $this->title = "Test Plugin with Public Page";
        $this->image = "https://gcdn.ippeurope.com/wp-content/uploads/IPPeurope-logo-dark.png";

        $plugin_fields = $this->getFields();
        $this->public_pages = [

protected function pages_page_one($REQ)

When adding a public page, the underlaying function is started with pages_ to define we are initializing the pages functionality, followed by the page slug. In our Example Constructor there are two public pages defined as page_one and page_two.


The Request parameter ($REQ) contains all available parameters from the POST or GET that initialized the visit for the page.
The REQ have been validated for invaliding requests before it is being served.

The URL for a public page

The URL for a public page is defined with two parameters. Pages and Page.

Pages define the Plugin of Question.

Page define the public page and function of the Request


Use of Theme header and Footer in Public Pages

Public Pages are as standard served without the Theme Frames enabled, due to why you will need manually to enable these.

Within the function you need to add:

					protected function pages_page_one($REQ) {

    echo head();
    echo "My Custom Page";
    echo foot();