Custom Fields
Re-Envisioned
Support MB Blocks How to get current post ID in backend

  • Creator
    Topic
  • #17841
    Resolved Jackky
    Participant

    I’m wondering how to get current editable post ID in block MB, because this doesn’t work:

    
    
            [
                'name'          => 'Страны',
                'id'            => 'countries',
                'type'          => 'post',
                'post_type'     => 'page',
                'placeholder'   => 'Выберите страницу',
                'query_args'    => [
                    'post_parent'           => @$_GET['post']
                ],
                'clone'         => true,
                'sort_clone'    => true,
                'add_button'    => '+',
            ],
    
Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #17842
    Jackky
    Participant

    Just find out, I can do it with $_POST[‘post_id’]

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash