Take a look this page from the codex. When creating a metabox, one of the options is a callback, which when called take a paramater for $post
, which is the same as calling global $post
( as a side note, you can still do this in the backend Admin and get all the same variables. )
Related Posts:
- Remove update nags for non-admins [duplicate]
- Any guides on creating custom admin pages?
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- renaming an admin menu item with decimal array index number
- Jquery no more loading, load-scripts.php not found (404)
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Handling error states with admin_post
- Installing wp3.2.1 on IIS; getting empty sessions
- Adding Field to Profile “Name”
- Admin Menus – Name Menu different from first Submenu [duplicate]
- Add a Custom Class to Admin Menus
- When is is_admin() available?
- Creating a new page and automatically associating it with a template in WordPress
- Unable to set right time in admin and frontend template
- List User order by ID in Descending order (Backend)
- Why is this Ajax not working?
- Admin Options page. Save as Array
- WooCommerce – Email admin with new user details
- Correct folder permissions?
- Selectbox in admin panel function linking to CSS
- Sort custom meta column by other meta value
- running wp-cron.php using php not wget
- Programmatically create page when saving custom post type post
- Building a WordPress App
- How can I open up my administrative panel to everyone?
- retain querystring values when savincustom options in admin
- Get categories names as an array to use it in theme settings
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- Removing custom sort order from admin page listing
- I installed WordPress locally now how do I login?
- Adding a ‘style=’ bit to image_send_to_editor output
- Get options from database using php class
- Limit ‘contributers’ abilities in WordPress
- In PHP how do I make my navigation bar show certain links to admins only?
- Woocommerce display orders with products from specific categories to specific admins
- PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
- admin panel – How to remove “delete” button from category editing page
- wordpress email checker on domain
- problem connecting to the administrator
- How to add a DELETE button to the “Edit User” WordPress admin page?
- Editing the term_order field
- Access to “My Site” is missing from the admin bar
- wordpress ajax return 0
- Dynamic form variables for post meta
- Include administrator in author list
- Shortcodes (with a space) added to php Sample
- Image not displayed
- Adding Media button to only pages
- Forbid certain users to access a specific page
- One folder to be accessible by one user
- Exclude Everywhere but Admin Area?
- AJAX WP_Query’s order and orderby parameters not working
- Pass media upload value to input field
- What does the token %1$s in WordPress represent [closed]
- WordPress redirect to landing page if not logged in
- PHP/Manual use of images? – 2 Questions
- Debugging upload problem: What part of WP does actual image-resizing?
- Remove class that has been added by parent theme
- How to use a frontend URL with a Plugin
- Get list of shortcodes from content
- Adding Google Analytics code to the tag of specific pages
- Site Health : An active PHP session was detected
- Custom image upload
- How to scale image with equal width and height without distortion?
- Create Logout Link WordPress Admin Menu
- Display post image with fancybox
- Attaching a pdf to Contact Form 7 e-mail via functions.php [closed]
- Getting array of customizer settings
- Ajax – Call to undefined function get_option()
- Display PHP within HTML values
- WordPress 3.2 query_posts and pagination, permalinks issue
- User management system similar to wordpress one?
- Call to undefined function wp() in wp-blog-header.php
- How does WordPress know wich language is chosen when there is a database connection error
- How to pass Select value from Javascript to PHP to generate select option on change
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Shortcode with PHP issue “Undefined index”
- Custom PHP script throws critical error ONLY when editing page
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- How do I include SVG file used as featured image?
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Adding regular php file to site
- REST API works in browser and via AJAX but fails via cURL
- How to display different submenus?
- Simple jQuery AJAX Request fails to run PHP Script
- Wp_editor doesn’t send the required data
- Can ‘Custom Field’ data be inserted into this Short Code?
- Merge 2 product attribute terms
- Run do_shortcode on php template using JS function
- global $product is empty string when passed into function
- How to update custom fields when post is published?
- Gravity Forms: How to add PHP function to confirmation conditional shortcode?
- wpdb->query returns different value to phpMyAdmin
- When to use wp_register_script() function?
- setcookie() issues on running with HTTPS on WordPress
- Posts with Custom Fields does not appear
- Replace TinyMCE with Custom Built Editor
- php grabbing every post made?
- Custom plugin doesn’t show in admin menu – when code added, displays an empty page