Trying to Add Admin Page to WP Plugin Boilerplate

I’m trying to add an admin page to the WordPress Boilerplate Plugin. I’ve looked at dozens of articles on the Codex, tutorials, and even this video
However, I have been unable to see an admin page in my dashboard.

Does anyone know what am I doing wrong?

Here are three sets of code:

* Register all of the hooks related to the public-facing functionality
* of the plugin.
* @since 1.0.0
* @access private
private function define_public_hooks() {

$plugin_public = new Givefree_Public( $this->get_plugin_name(), $this->get_version() );

$this->loader->add_action( ‘wp_enqueue_scripts’, $plugin_public, ‘enqueue_styles’ );
$this->loader->add_action( ‘wp_enqueue_scripts’, $plugin_public, ‘enqueue_scripts’ );



* display_admin_page( $page_title, $menu_title, $capability, $menu-slug, $function );

public function display_admin_page() {
‘giveFree’, //$page_title
‘giveFree’, //$menu_title
‘mangage_options’, //$capability
‘givefree-admin’, //$menu-slug
array($this, ‘showPage’), //$function
‘dashicons-heart’, //$icon_url
‘3.0’ //$position number on menu from top

public function showPage() {
include plugins_url( ‘givefree/admin/partials/givefree-admin-display.php’ );


<div class=”wrap”>This is an options page.</div>

Let me know your thoughts. Thank you so much!

Read more here:: Trying to Add Admin Page to WP Plugin Boilerplate

Leave a Reply

Your email address will not be published. Required fields are marked *