to create a page with your own content, you can do like that :
add_action("admin_menu", function () {
$post_type = get_post_type_object("property");
add_submenu_page(
" "
, "Page title"
, ""
, $post_type->cap->edit_posts
, "property__validationForm"
, function () {
do_action("property/validationForm");
}
);
});
add_action("property/validationForm", function () {
?>
<pre><?php var_dump($_GET);?></pre>
form
<?php
});
to create a URL to this page, use this code :
$url = admin_url("admin.php");
$url = add_query_arg([
"page" => "property__validationForm",
"property_ID" => $property->ID,
], $url);
for more informations about the function add_submenu_page
, you can look in the codex :
https://developer.wordpress.org/reference/functions/add_submenu_page/
Related Posts:
- How to pass parameters to admin_notices?
- Use latest jQuery in WordPress (admin interface)
- remove_action with profile_personal_options
- WYSIWYG – Getting the “link” button from HTML mode in Visual mode
- Admin: global $post empty
- Adding another “Add Post” button to admin
- One button on admin page works but not two
- Add custom button next to native “Apply” button in the edit-tag screen
- How to pass multiple parameter in add_action()
- Hide post title input for all roles except admin
- Other than save_post any other actions on add / edit post screen?
- Find out if post was just updated on post edit screen
- Form submit in admin does not set is_admin() true
- ‘Conflict’ with action deleted_post and is_admin()
- Unsure how to add simple checkboxes that write to a small table to admin
- Where in WP can I check history or log of updates of plugins etc?
- How does admin-ajax.php work?
- Hide other users’ posts in admin panel
- Editor Styles and Typekit
- WordPress admin stylesheet
- Is it possible to create a WordPress tour? V3.3.1
- Securing Admin Accounts – Username Discovery
- Prevent author from changing their posts if admin has modified
- Showing WP_Error message with admin_notice action hook
- Set Featured Image programmatically (in admin) with JavaScript?
- Can I set a default dashboard layout for all users?
- Taxonomy/category hierarchy lost when editing posts [closed]
- Making the thumbnails in the backend Media section bigger
- How to remove “Super Admin” from All Users for those that are not a “Super Admin”?
- Setting Login with User Name and Password default option for Jetpack Admin Login
- Actions that Run on Admin Edit Page Load After Posts Are Queried
- Is there an action that is called when a post is restored from the trash?
- Downloading entire site locally with httrack
- add_submenu_page set for multiple roles [duplicate]
- How To Create User Specific Admin User Pages?
- Adding markup to column text in “Edit Pages” admin page
- Disable HTML (Text) Tab in Post Editor
- How to remove “publish metabox” from each post type
- Change home-url in dashboard
- Add html to cpt main page / admin edit.php
- Admin doesn’t have sufficient permissions to plugin’s page
- Admin multiple column sorting
- How do I add a contact form?
- Adding html format on tinymce visual editor
- How can I show the contents of only a few users
- WordPress ACL (folder + permissions)
- Editors change a permalink on an unpublished post, but only admins change a permalink on a post that has ever been published?
- Locked out of admin and some pictures don’t show after failed SSL installation
- Grabbing the first image attached to a post and use it with the admin columns
- Add Custom Script in Other Plugin’s Options page
- Filter for when the post is updated
- I can’t access the login panel on my offline website
- Output the admin menu_position for each item
- Admin login not working
- WordPress custom admin functions security
- Adding and removing columns from the admin pages panel
- paginate_links on custom query in admin – ‘sufficient permissions’ error
- I need help using pre_get_comments to limit comments in the comments admin screen
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- Hide admin notice when user profile updated
- WordPress Screen options does not show any fields
- Locked out of WordPress website from wrong amount of login attempts
- Echo string in admin panel footer beside version no
- Black admin bar is being hidden by page elements
- admin edit link from a specific page
- Set Link Target Checkbox chcked on Edit Image MOdal Window in Admin Post Edit Screen?
- Help! I changed the domain and now I can’t log in via admin online
- Username was changed to “admin”
- Admin user roles/permissions
- [Multisite]How can I update custom blog option?
- Top toolbar is not showing in wordpress admin panel
- wordpress – add a custom admin section with fields for name, address, city,state, and photo upload
- Problem with implenting Uploadify with WordPress
- Best way to reset some admin options form to default?
- Authorize subdomain to access and read user and admin cookies
- Can’t see past events on admin dashboard
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- Only a small portion of my export page renders
- How can I restrict ‘edit_form_after_’ to a specific post/page?
- exclude ID on avatar
- Missing content on website. Admins cant sign in
- Different role for free and pro users in wordpress without using bbpress
- Is Post-Form Resubmission somehow prevented in WordPress 4.2.2?
- Enqueue script throws error in console
- How to sort post_meta in edit.php?
- Scripts are not called until I login from wordpress backend
- Link to all posts page?
- WP Logs me out after updating anything on dashboard
- Adding additional text fields and image upload to a Page?
- If the only thing I use MySQL for is WordPress, do I need MySQL’s timezone tables?
- plugin to upload to youtube via wordpress [closed]
- How to fix: Clicking ‘Quick Edit’ link in Admin (edit.php) makes posts disappear?
- My Account Lost Administrator permission
- WordPress admin panel is blank
- Use the wordpress admin table
- deploying a standard build of wordpress in WHM/cPanel
- 2FA for admin login only, is it doable?
- Add a user to edit the layout of a site
- CSS Styles specific to Admin Sidebar not loading
- Display notice in block editor after wp_insert_post_data hook