I am developing a plugin but I have a trouble because I don't get hook an action to a function and show the content. I am noob developer Wordpress Plugins so sorry if i do stupid stuff. My plugin starts in page1.php and when I press a submit button to page2.php, I have a function which I want hooking, but I've tried this add_action and didn't work and I don't know which tag is the correct, if i need add some more or what can be happenning. I read several times the documentation and I've tried somethings as I said but nothing. All help is welcome, thanks in advance.
//page2.php
function testFunction(){
echo "hello";
}
add_action('page2_page', 'testFunction');
add_action('init', 'testFunction');
'page2_page'
pointing to? You may first, start by troubleshooting, hooking your function to an existing predefined location by WordPress. You can do so by editing your initialhello.php
and hook your function to theadmin_notices
area of the dashboard, then, enable it (theHello Dolly
plugin); you should see hello printed in the notification area of your dashboard. BTW: did you registered your plugin as expected? What was your approach? – nyedidikeke