Is it possible to get page's metabox value within shortcode that is executed on that page?
Scenario:
- I have a sidebar metabox for every page.
- I have some kind of custom gallery shortcode.
My gallery shortcode outputs 600x200 images (I'm using timthumb here).
BUT I want it to display 900x300 if there's no sidebar.
Normally I'd use:
$sidebar = get_post_meta($post->ID, 'metabox_sidebar', true);
if($sidebar == "true") { do something }
else { do something else }
But get_post_meta returns nothing within the shortcode body.