Hello,
Can you please advice how I can get the Post ID within the function lp_register_meta_boxes( function .
I tried
global $post;
$id = $post->ID;
But this doesn't seem to work..
In fact, I need to get a field value (already stored) for the same post id the metabox is registered for .
I tried rwmb_meta() but it doesn't work without post id.
Thank you very much,
Portion of the code
global $post;
$post_id = $post->ID;
$event_tracks = rwmb_meta( 'event_tracks', 'type=select', $post_id );
$meta_boxes[] = array(
'id' => 'event_timeline',
'title' => 'Event Timeline .. ' . $event_tracks,
.................