Custom WP_Query on meta box and global post issue
-
Hi,
I have created some meta boxes on my theme, related on a new custom post type. Now, On these meta boxes there are some WP_Query. There are 4 meta boxes, 3 of them are on side context, the last is on main context.In this last meta box, I cannot get the ID of the post I’m editing.
I’ve tried to reset WP_Query with wp_reset_query(), wp_reset_postdata(). I’ve tried to save original variables ($post and $wp_query) and then restore them after loops, without solution.
What can I do? My last solution is to $_GET[“post”] in order to get the ID of the item I’m editing.
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom WP_Query on meta box and global post issue’ is closed to new replies.