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

  • SEARCH
  • Home
  • 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 8909521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:27:01+00:00 2026-06-15T03:27:01+00:00

I am trying the following syntax to add menu-item on dashboard: <?php add_menu_page( $page_title,

  • 0

I am trying the following syntax to add menu-item on dashboard:

<?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?>

But, I am confused where to add this code.

Whether to add it in my theme’s functions.php or my plugin’s functions.php ?

Or any other way to add custom menu-item on the dashboard of the wordpress logged in as admin ?

I want to add custom menu item like the following image:add_custom_menu_item

  • 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-15T03:27:02+00:00Added an answer on June 15, 2026 at 3:27 am

    What you see in the screenshot is the screen of a Custom Post Type. In the documentation you will find an example code on how to add such a screen.

    About where to place the code – it depends. Do you want to be able to use this Custom Post Type in other themes, or you will only need it in this theme?

    If you want to use it in other themes as well, put the code in your plugin’s code.

    If you want to use it only in this theme, put it in your theme’s functions.php.

    And in case you still want to add a custom menu page, here you will find examples on what is the proper way to use this function. What you should note, is that the call to add_menu_page() should be done inside a function that is run on the admin_menu action.

    Here’s an example working code with WP 3.4.2

    function register_custom_menu_page() {
        add_menu_page('custom menu title', 'custom menu', 'add_users', 'custompage', '_custom_menu_page', null, 6); 
    }
    add_action('admin_menu', 'register_custom_menu_page');
    
    function _custom_menu_page(){
       echo "Admin Page Test";  
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following syntax error when trying to add a hyperlink,I looked
I found the following syntax as a VB.NET property and I'm trying to convert
I'm trying to use is_member_pointer from the type_traits header, with the following syntax, for
I am trying to determine the correct RegEx syntax to perform the following. I
I'm trying to convert the following jquery to javascript syntax, but being not familiar
I'm trying to execute the following code, but I'm getting SyntaxError: invalid syntax at
I'm getting the following error when trying to add some data from myXml.xml to
I am trying to add a custom style to each list item within Joomla!s
I am trying to add font face and color and running into following error
I am getting the following error: Parse error: syntax error, unexpected '<' in /home/u7mtb69/public_html/wpsitehrhhw/wp-content/themes/hrhhw.1.1/functions.php

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.