I am creating a plugin for WordPress but I can't figure out how to redirect or link to another .php file within the admin panel.
I have a list with items, and a button to redirect to another page that will be settings for this item.
So far I have been trying to accomplish it with this $page = 'vd_booking-Cabin'; $id = $row->id; $record_url = add_query_arg(compact('page', 'id'), admin_url('admin.php')); echo "<td><a href='$record_url'>Change</a></td>";
But when I click that, it tells me that I don't have enough privileges to access this page.
This is the first time I do anything with wordpress so I might be doing everything wrong.
You can write like below.
admin_url('admin.php?page=xyz');
OR
Create menu for particular section.
menu_page_url('vd_booking-Cabin');