After too many tries i have found following solution myself, but this could save others time.
$pid = (isset($_GET['post']) ? $_GET['post'] : $_POST['post_ID']);
$page_att = get_page( $pid );
$page_parent = $page_att->post_parent;
if(15 == $page_parent){
//register metabox
}
Related Posts:
- Condition display metabox in case the post is saved
- What is the “Advanced” $context in add_meta_box?
- Creating a metabox to upload multiple images
- Post custom metabox textarea using wp_editor
- How do I get attachment_id?
- Removing Metabox for “Slug” without removing functionality
- Prevent sorting and dragging of specific postbox metabox
- Removing meta boxes: remove-meta_box() or unset()?
- CMB2 metabox conditional logic
- Adding submit or update button to custom metabox?
- How to pass variable via $callback_args for add_meta_box
- Undefined function error when creating Custom Meta Box
- How to get meta box data to display on a page
- Move excerpt to always be directly below post content in admin
- Use meta box value in CPT as post title
- Getting the ID of a meta box
- Custom filter for the_content doesn’t work correctly
- Check if meta key value already exists
- Is there a predefined callback function for custom categories?
- PHP Warning: call_user_func() expects parameter 1 to be a valid callback
- custom meta box data not saved
- How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
- Position right sidebar metabox right below the publish metabox?
- WordPress media manager multiple selection output
- How to store multiple input values with same meta_key
- post-excerpt not one of the options under screen options
- How to remove/hide the predictive autocomplete popup when I type in the tag/term metabox
- metabox upload file
- Are there any standard HTML markup for metabox?
- Can not pass the value of google pie chart from custom meta box
- Dynamically adding WYSIWYG to metaboxes
- Filter Hook Returning Blank When Used Twice
- How to add a SAVE button to replace PUBLISH on a custom post type?
- Why does get_post_meta not work with the posts page?
- Taxonomy as checkboxes
- What are ‘authors’ in WordPress, and is there an author ‘metabox class’ available anywhere?
- Convert textarea with wp_editor
- Trying to limit access to custom meta box without success
- Setting multiple image urls using WordPress’ Media Uploader
- Custom metabox field help tips popups
- How to detect if metabox content was updated by the user
- Getting gutenberg (WordPress 5) to save TInymce data?
- Adding metabox to wordpress plugins menu page
- Edit woocommerce product post type
- Get meta fields by meta box id
- Set default value for radio button in WP Alchemy custom meta box?
- quicktags “link” button doesn’t work, but all other buttons do
- How do wordpress hooks respond to user interaction?
- Add custom action in post type
- PHP Notice: Undefined index: mytheme_meta_box_nonce
- Polylang not translating Metabox fields [closed]
- Global Variable vs Local Variable
- input radio ‘checked’ saves, but select option ‘selected’ doesn’t
- save_post_{$post->post_type} action firing on second save
- Add a metabox when editing a media – but only for images
- edit_page or edit-pages for current_user_can()?
- Save meta data with post, Without using any plugin [closed]
- Metabox not being added
- Editor meta box Showing but not saving
- Adding a metabox shortcode “paypal accept payment” in my custom post type back-end
- The $post variable – Did I get the grasp of how the Backend actions get parsed?
- Change the title of an Administration Panel
- echo the value of a a meta select box
- display metabox on front end (my-metabox-class)
- Custom Meta Box calling JS function twice
- How to add a textarea to only one of the fields of this custom metabox?
- Custom Meta Data is not being saved
- how to reset metabox excerpt to open
- Post and Pages section inside WordPress admin are completely blank
- How to create a custom metabox like the wordpress provided tag metabox?
- Update Post meta with custom variable
- How to alter static Page text through the Theme Customizer API
- Moving a metabox – not obeying context or removing old
- Programmatically create new post from a metabox button
- Saving metabox content not working
- semantic ui dropdown for custom metabox
- How to hide/show meta box using jQuery,if click on Drop-Down Menu
- wp_editor metabox does not output the saved html format
- Get value from meta box
- Adding Meta Box to Specific Submenu Page
- Multiple category filters
- meta_box: update_post_meta for
- Issue with file paths after porting metabox from main theme to child theme
- Error in get post by met_key
- Custom meta box not saving values of radio buttons in WordPress
- Display multiple “save draft button” on a post edit
- Serialization problem after auto-update
- Selecting a dynamic sidebar via metabox in wordpress
- Add additional metafields based on value of select box
- How to show metabox key to custom post?
- Issues with Saving Dynamic Metabox
- Updating post meta and Meta Box plugin
- header specific meta box result detect url
- Meta Boxes causing Header errors
- Attaching a metabox to a single post
- How do I allow Authors and Contributors to use the metabox
- CSS styling not working in a custom metabox
- CPT posts in drop downed in meta box on page doesn’t return post ID
- How to make remove display none to this div container in post meta box?
- how making a selection from a taxonomy selector fixed definitively