add_menu_page doesn't add any pages in wordpress The Next CEO of Stack OverflowCan 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

Why didn't Khan get resurrected in the Genesis Explosion?

What did we know about the Kessel run before the prequels?

Newlines in BSD sed vs gsed

Is a distribution that is normal, but highly skewed considered Gaussian?

How to edit “Name” property in GCI output?

How did people program for Consoles with multiple CPUs?

Is it professional to write unrelated content in an almost-empty email?

The past simple of "gaslight" – "gaslighted" or "gaslit"?

Why does standard notation not preserve intervals (visually)

Should I tutor a student who I know has cheated on their homework?

Why is quantifier elimination desirable for a given theory?

I want to delete every two lines after 3rd lines in file contain very large number of lines :

Is French Guiana a (hard) EU border?

0 rank tensor vs 1D vector

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Axiom Schema vs Axiom

Grabbing quick drinks

RigExpert AA-35 - Interpreting The Information

Why isn't acceleration always zero whenever velocity is zero, such as the moment a ball bounces off a wall?

How to count occurrences of text in a file?

Find non-case sensitive string in a mixed list of elements?

Does increasing your ability score affect your main stat?

Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?

Why do remote US companies require working in the US?



add_menu_page doesn't add any pages in wordpress



The Next CEO of Stack OverflowCan 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























    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



























      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

























        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













        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












        share|improve this answer



        share|improve this answer










        answered Mar 13 at 12:17









        NynosNynos

        63




        63





























            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

            1928 у кіно

            Захаров Федір Захарович

            Ель Греко