Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9160727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:48:20+00:00 2026-06-17T13:48:20+00:00

I have a WordPress plugins script <?php /* Plugin Name: Saswat Routroy Plugin URI:

  • 0

I have a WordPress plugins script

<?php
/*
Plugin Name: Saswat Routroy
Plugin URI: http://www.maheshchari.com/
Description: Description of my plugin
Author URI: http://www.maheshchari.com/
*/
class new_menu {

    function new_menu()
    {
        add_action('admin_menu', array(&$this, 'my_admin_menu'));
    }

    function my_admin_menu()
    {   //create a main admin panel
        //create a sub admin panel link above
        add_menu_page('CMS', 'CMS', 'administrator', 8, array(&$this,'overview'));
        add_submenu_page(8, 'View CMS Page', 'View CMS Page', 'administrator', 1, array(&$this,'view_page'));
        add_submenu_page(8, 'Add CMS Page', 'Add CMS Page', 'administrator', 2, array(&$this,'add_page'));
        //These functions adds sub menu for different kinds of admin panel on back end
        add_options_page('Pages Options', 'Saswat  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_options'));
        add_posts_page('Pages posts', 'Saswat  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_posts'));
        add_media_page('Pages media', 'Saswat  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_media'));
        add_pages_page('Pages pages', 'Saswat  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_pages'));
        add_users_page('Pages users', 'Saswat  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_users'));
        add_management_page('maheshchari', 'Mahesh  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_tools'));
        add_theme_page('maheshchari', 'Mahesh  Plugin', 'administrator', basename(__file__),array(&$this, 'my_plugin_themes'));

    }


    function overview()
    {
        echo '<h2>My WordPress Plugin Overview</h2>';
    }

    function view_page()
    {
        echo '<h2>My WordPress Plugin Settings</h2>';
    }

    function add_page()
    {
        //echo '<h2>My WordPress Plugin Generel</h2>';
        echo "<form method='POST' action=''>
    <ul>
        <li><label for='fname'>Family Name (Sir Name)<span> *</span>: </label>
        <input id='fname' maxlength='45' size='10' name='fname' value='' /></li>    

        <li><label for='lname'>Last Name<span> *</span>: </label>
        <input id='lname' maxlength='45' size='10' name='lname' value='' /></li>
        <li><label for='lname'>Last Name<span> *</span>: </label>
        <input type='submit' maxlength='45' size='10' name='lname' value='' /></li>
    </ul>
</form>";
    }
    function my_plugin_options()
    {
        echo '<h2>My WordPress Plugin Options</h2>';

    }
    function my_plugin_posts()
    {
        echo '<h2>My WordPress Plugin posts</h2>';
    }
    function my_plugin_media()
    {
        echo '<h2>My WordPress Plugin media</h2>';
    }
    function my_plugin_pages()
    {
        echo '<h2>My WordPress Plugin pages</h2>';
    }
    function my_plugin_users()
    {
        echo '<h2>My WordPress Plugin users</h2>';
    }

    function my_plugin_tools()
    {
        echo '<h2>My WordPress Plugin tools</h2>';
    }

    function my_plugin_themes()
    {
        echo '<h2>My WordPress Plugin themes</h2>';
    }


}


$mybackuper = &new new_menu();//instance of the plugin class

?>

The file is kept under \wp-content\plugins\admin-menu\new_menu.php

Now in the function add_page() I am echoing the html. I don’t want to do this, is there way that I can load a .php page under the function without echoing the script.

Say something like

<?php get_template_part( 'content-home' );?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:48:21+00:00Added an answer on June 17, 2026 at 1:48 pm

    i got the answer

    include('content-home.php');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using following WordPress plugin to send email. http://coffee2code.com/wp-plugins/configure-smtp/ I have done configuration,
http://demo.thethemefoundry.com/traction/#post-183 Which wordpress plugin is this, to have post image on the left side
Wordpress / PHP related question. I have a Wordpress plugin that uses dirname(__File__) to
I'm getting this warning message on a Wordpress I have just setup: http://wptest.paddingtonterraces.com.au/ Warning:
I am using the SWFUpload from http://www.anedix.com/data/file/news/realname/swfupload-php-example-v1_4.zip and want to integrate this into my
i have installed wordpress and i i have installed couple of plugins and i
I have to upgrade a running wordpress site's wordpress CMS and some installed plugins.and
I have a WordPress plugin with settings page. On this settings page, the form
I have created a simple WordPress plugin that automatically sets my new sites up
I have some HTML that is being produced by a WordPress plugin that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.