add_menu_page doesn't add any pages in wordpress2019 Community Moderator ElectionCan I install/update WordPress plugins without providing FTP access?Create a folder if it doesn't already existHow to add a PHP page to WordPress?Using functions for a particular hook eg-admin_menuWordPress Plugin: Call function on button click in admin panelwordpress creating a full-width dashboard widgetConverting my website into WordpressWordPress Plugin Customize menu and submenuiframe in wordpress admin menu

How to define limit operations in general topological spaces? Are nets able to do this?

HP P840 HDD RAID 5 many strange drive failures

How can my new character avoid being a role-playing handicap to the party?

Constant Current LED Circuit

I seem to dance, I am not a dancer. Who am I?

Hausdorff dimension of the boundary of fibres of Lipschitz maps

How can an organ that provides biological immortality be unable to regenerate?

What is the term when voters “dishonestly” choose something that they do not want to choose?

What is the significance behind "40 days" that often appears in the Bible?

The average age of first marriage in Russia

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

PTIJ What is the inyan of the Konami code in Uncle Moishy's song?

How to generate binary array whose elements with values 1 are randomly drawn

Do I need to be arrogant to get ahead?

Is it insecure to send a password in a `curl` command?

In what cases must I use 了 and in what cases not?

Suggestions on how to spend Shaabath (constructively) alone

My friend is being a hypocrite

Am I eligible for the Eurail Youth pass? I am 27.5 years old

Is it correct to say "which country do you like the most?"

Light propagating through a sound wave

What exactly term 'companion plants' means?

How is the partial sum of a geometric sequence calculated?

Does the attack bonus from a Masterwork weapon stack with the attack bonus from Masterwork ammunition?



add_menu_page doesn't add any pages in wordpress



2019 Community Moderator ElectionCan I install/update WordPress plugins without providing FTP access?Create a folder if it doesn't already existHow to add a PHP page to WordPress?Using functions for a particular hook eg-admin_menuWordPress Plugin: Call function on button click in admin panelwordpress creating a full-width dashboard widgetConverting my website into WordpressWordPress Plugin Customize menu and submenuiframe in wordpress admin menu










1















I can't figure out why my code doesn't work. I'm developing a plug-in in wordpress and I want it to have a page in the admin panel. I tried this code put it didn't brought me far.






<?php 

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
echo '<h1>test</h1>';
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
6);



function overzicht_admin_page()
echo "test";
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php


?>





I hope someone can help me!










share|improve this question






















  • Welcome to StackOverflow. Your code works fine. When you say it isn't working, what exactly is the problem you are having? e.g. does the option not appear in the admin menu? Does it not open a page? Do you get an error? etc

    – FluffyKitten
    Mar 7 at 20:01











  • Hey! It doesn't do anything. I save the code in the plug-in map and when i reload the page there is no menu item added. So there doesn't even appear a menu item. I do not get any errors.

    – Nynos
    Mar 7 at 20:29











  • What do you mean the "plug-in map"? If you add it directly into the main plugin file it works. e.g. if your plugin is called myplugin, then add it to the myplugin.php file.

    – FluffyKitten
    Mar 7 at 20:30











  • I made a map in the plug-in file from wordpress named overzichtproducten. In that file I saved the php file above. I can even edit it in wordpress plug-in editor!

    – Nynos
    Mar 9 at 11:30











  • Do you have a clue? @FluffyKitten

    – Nynos
    Mar 12 at 15:41















1















I can't figure out why my code doesn't work. I'm developing a plug-in in wordpress and I want it to have a page in the admin panel. I tried this code put it didn't brought me far.






<?php 

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
echo '<h1>test</h1>';
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
6);



function overzicht_admin_page()
echo "test";
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php


?>





I hope someone can help me!










share|improve this question






















  • Welcome to StackOverflow. Your code works fine. When you say it isn't working, what exactly is the problem you are having? e.g. does the option not appear in the admin menu? Does it not open a page? Do you get an error? etc

    – FluffyKitten
    Mar 7 at 20:01











  • Hey! It doesn't do anything. I save the code in the plug-in map and when i reload the page there is no menu item added. So there doesn't even appear a menu item. I do not get any errors.

    – Nynos
    Mar 7 at 20:29











  • What do you mean the "plug-in map"? If you add it directly into the main plugin file it works. e.g. if your plugin is called myplugin, then add it to the myplugin.php file.

    – FluffyKitten
    Mar 7 at 20:30











  • I made a map in the plug-in file from wordpress named overzichtproducten. In that file I saved the php file above. I can even edit it in wordpress plug-in editor!

    – Nynos
    Mar 9 at 11:30











  • Do you have a clue? @FluffyKitten

    – Nynos
    Mar 12 at 15:41













1












1








1


1






I can't figure out why my code doesn't work. I'm developing a plug-in in wordpress and I want it to have a page in the admin panel. I tried this code put it didn't brought me far.






<?php 

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
echo '<h1>test</h1>';
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
6);



function overzicht_admin_page()
echo "test";
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php


?>





I hope someone can help me!










share|improve this question














I can't figure out why my code doesn't work. I'm developing a plug-in in wordpress and I want it to have a page in the admin panel. I tried this code put it didn't brought me far.






<?php 

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
echo '<h1>test</h1>';
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
6);



function overzicht_admin_page()
echo "test";
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php


?>





I hope someone can help me!






<?php 

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
echo '<h1>test</h1>';
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
6);



function overzicht_admin_page()
echo "test";
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php


?>





<?php 

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
echo '<h1>test</h1>';
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
6);



function overzicht_admin_page()
echo "test";
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php


?>






php wordpress






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 16:36









NynosNynos

63




63












  • Welcome to StackOverflow. Your code works fine. When you say it isn't working, what exactly is the problem you are having? e.g. does the option not appear in the admin menu? Does it not open a page? Do you get an error? etc

    – FluffyKitten
    Mar 7 at 20:01











  • Hey! It doesn't do anything. I save the code in the plug-in map and when i reload the page there is no menu item added. So there doesn't even appear a menu item. I do not get any errors.

    – Nynos
    Mar 7 at 20:29











  • What do you mean the "plug-in map"? If you add it directly into the main plugin file it works. e.g. if your plugin is called myplugin, then add it to the myplugin.php file.

    – FluffyKitten
    Mar 7 at 20:30











  • I made a map in the plug-in file from wordpress named overzichtproducten. In that file I saved the php file above. I can even edit it in wordpress plug-in editor!

    – Nynos
    Mar 9 at 11:30











  • Do you have a clue? @FluffyKitten

    – Nynos
    Mar 12 at 15:41

















  • Welcome to StackOverflow. Your code works fine. When you say it isn't working, what exactly is the problem you are having? e.g. does the option not appear in the admin menu? Does it not open a page? Do you get an error? etc

    – FluffyKitten
    Mar 7 at 20:01











  • Hey! It doesn't do anything. I save the code in the plug-in map and when i reload the page there is no menu item added. So there doesn't even appear a menu item. I do not get any errors.

    – Nynos
    Mar 7 at 20:29











  • What do you mean the "plug-in map"? If you add it directly into the main plugin file it works. e.g. if your plugin is called myplugin, then add it to the myplugin.php file.

    – FluffyKitten
    Mar 7 at 20:30











  • I made a map in the plug-in file from wordpress named overzichtproducten. In that file I saved the php file above. I can even edit it in wordpress plug-in editor!

    – Nynos
    Mar 9 at 11:30











  • Do you have a clue? @FluffyKitten

    – Nynos
    Mar 12 at 15:41
















Welcome to StackOverflow. Your code works fine. When you say it isn't working, what exactly is the problem you are having? e.g. does the option not appear in the admin menu? Does it not open a page? Do you get an error? etc

– FluffyKitten
Mar 7 at 20:01





Welcome to StackOverflow. Your code works fine. When you say it isn't working, what exactly is the problem you are having? e.g. does the option not appear in the admin menu? Does it not open a page? Do you get an error? etc

– FluffyKitten
Mar 7 at 20:01













Hey! It doesn't do anything. I save the code in the plug-in map and when i reload the page there is no menu item added. So there doesn't even appear a menu item. I do not get any errors.

– Nynos
Mar 7 at 20:29





Hey! It doesn't do anything. I save the code in the plug-in map and when i reload the page there is no menu item added. So there doesn't even appear a menu item. I do not get any errors.

– Nynos
Mar 7 at 20:29













What do you mean the "plug-in map"? If you add it directly into the main plugin file it works. e.g. if your plugin is called myplugin, then add it to the myplugin.php file.

– FluffyKitten
Mar 7 at 20:30





What do you mean the "plug-in map"? If you add it directly into the main plugin file it works. e.g. if your plugin is called myplugin, then add it to the myplugin.php file.

– FluffyKitten
Mar 7 at 20:30













I made a map in the plug-in file from wordpress named overzichtproducten. In that file I saved the php file above. I can even edit it in wordpress plug-in editor!

– Nynos
Mar 9 at 11:30





I made a map in the plug-in file from wordpress named overzichtproducten. In that file I saved the php file above. I can even edit it in wordpress plug-in editor!

– Nynos
Mar 9 at 11:30













Do you have a clue? @FluffyKitten

– Nynos
Mar 12 at 15:41





Do you have a clue? @FluffyKitten

– Nynos
Mar 12 at 15:41












1 Answer
1






active

oldest

votes


















0














I solved it, the code above works but only in the same file as where you put in the name of your plug-in.






<?php
/*
Plugin Name: Overzicht producten
Description: Een aansluiting op Woocommerce als overzicht van producten.
Author: Nynke van de Nadort
Version: 1.0
Author URI: none
Text Domain: Nynke van de Nadort
*/

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu()
add_menu_page( 'Overzicht producten',
'Overzicht top',
'manage_options',
'overzichtproducten/index.php',
'overzicht_admin_page' ,
null,
10);



function overzicht_admin_page()
?>
<div class="wrap">
<h2>Welcome To My Plugin</h2>
</div>
<?php



?>








share|improve this answer








New contributor




Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55048742%2fadd-menu-page-doesnt-add-any-pages-in-wordpress%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I solved it, the code above works but only in the same file as where you put in the name of your plug-in.






    <?php
    /*
    Plugin Name: Overzicht producten
    Description: Een aansluiting op Woocommerce als overzicht van producten.
    Author: Nynke van de Nadort
    Version: 1.0
    Author URI: none
    Text Domain: Nynke van de Nadort
    */

    add_action( 'admin_menu', 'my_admin_menu' );

    function my_admin_menu()
    add_menu_page( 'Overzicht producten',
    'Overzicht top',
    'manage_options',
    'overzichtproducten/index.php',
    'overzicht_admin_page' ,
    null,
    10);



    function overzicht_admin_page()
    ?>
    <div class="wrap">
    <h2>Welcome To My Plugin</h2>
    </div>
    <?php



    ?>








    share|improve this answer








    New contributor




    Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0














      I solved it, the code above works but only in the same file as where you put in the name of your plug-in.






      <?php
      /*
      Plugin Name: Overzicht producten
      Description: Een aansluiting op Woocommerce als overzicht van producten.
      Author: Nynke van de Nadort
      Version: 1.0
      Author URI: none
      Text Domain: Nynke van de Nadort
      */

      add_action( 'admin_menu', 'my_admin_menu' );

      function my_admin_menu()
      add_menu_page( 'Overzicht producten',
      'Overzicht top',
      'manage_options',
      'overzichtproducten/index.php',
      'overzicht_admin_page' ,
      null,
      10);



      function overzicht_admin_page()
      ?>
      <div class="wrap">
      <h2>Welcome To My Plugin</h2>
      </div>
      <?php



      ?>








      share|improve this answer








      New contributor




      Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        0












        0








        0







        I solved it, the code above works but only in the same file as where you put in the name of your plug-in.






        <?php
        /*
        Plugin Name: Overzicht producten
        Description: Een aansluiting op Woocommerce als overzicht van producten.
        Author: Nynke van de Nadort
        Version: 1.0
        Author URI: none
        Text Domain: Nynke van de Nadort
        */

        add_action( 'admin_menu', 'my_admin_menu' );

        function my_admin_menu()
        add_menu_page( 'Overzicht producten',
        'Overzicht top',
        'manage_options',
        'overzichtproducten/index.php',
        'overzicht_admin_page' ,
        null,
        10);



        function overzicht_admin_page()
        ?>
        <div class="wrap">
        <h2>Welcome To My Plugin</h2>
        </div>
        <?php



        ?>








        share|improve this answer








        New contributor




        Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        I solved it, the code above works but only in the same file as where you put in the name of your plug-in.






        <?php
        /*
        Plugin Name: Overzicht producten
        Description: Een aansluiting op Woocommerce als overzicht van producten.
        Author: Nynke van de Nadort
        Version: 1.0
        Author URI: none
        Text Domain: Nynke van de Nadort
        */

        add_action( 'admin_menu', 'my_admin_menu' );

        function my_admin_menu()
        add_menu_page( 'Overzicht producten',
        'Overzicht top',
        'manage_options',
        'overzichtproducten/index.php',
        'overzicht_admin_page' ,
        null,
        10);



        function overzicht_admin_page()
        ?>
        <div class="wrap">
        <h2>Welcome To My Plugin</h2>
        </div>
        <?php



        ?>








        <?php
        /*
        Plugin Name: Overzicht producten
        Description: Een aansluiting op Woocommerce als overzicht van producten.
        Author: Nynke van de Nadort
        Version: 1.0
        Author URI: none
        Text Domain: Nynke van de Nadort
        */

        add_action( 'admin_menu', 'my_admin_menu' );

        function my_admin_menu()
        add_menu_page( 'Overzicht producten',
        'Overzicht top',
        'manage_options',
        'overzichtproducten/index.php',
        'overzicht_admin_page' ,
        null,
        10);



        function overzicht_admin_page()
        ?>
        <div class="wrap">
        <h2>Welcome To My Plugin</h2>
        </div>
        <?php



        ?>





        <?php
        /*
        Plugin Name: Overzicht producten
        Description: Een aansluiting op Woocommerce als overzicht van producten.
        Author: Nynke van de Nadort
        Version: 1.0
        Author URI: none
        Text Domain: Nynke van de Nadort
        */

        add_action( 'admin_menu', 'my_admin_menu' );

        function my_admin_menu()
        add_menu_page( 'Overzicht producten',
        'Overzicht top',
        'manage_options',
        'overzichtproducten/index.php',
        'overzicht_admin_page' ,
        null,
        10);



        function overzicht_admin_page()
        ?>
        <div class="wrap">
        <h2>Welcome To My Plugin</h2>
        </div>
        <?php



        ?>






        share|improve this answer








        New contributor




        Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Mar 13 at 12:17









        NynosNynos

        63




        63




        New contributor




        Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Nynos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55048742%2fadd-menu-page-doesnt-add-any-pages-in-wordpress%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

            How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

            List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229