• xiaawan

    (@xiaawan)


    Hi All can anyone help me with this.
    I have created some menus in wordpress through a plugin. And it works fine. Every menu displays contents when it is clicked by a user by calling a function. My problem is that there are many links within contents. I want every link to be associated with a function just like we create a menu/sub-menu to associate it with menu/sub-menu. And the parameters are being passed in the URL. How it can be achieved.

    Here is an example
    <?php
    add_submenu_page(__FILE__, ‘Test’, ‘Test’, 8, ‘test/t2’, ‘show_page’);
    function show_page()
    {
    echo “Click Here“;
    }
    ?>
    When Test is clicked it calls the function show_page
    And it displays something.

    Now if someone clicks on “Click Here”, I want to call the same function that was callled by clicking the menu.

    Please Help.
    Thanks in Advance

  • The topic ‘Adding function for a link using plugin’ is closed to new replies.