Title: Wrong global $post
Last modified: January 13, 2022

---

# Wrong global $post

 *  [alexandregagner](https://wordpress.org/support/users/alexandregagner/)
 * (@alexandregagner)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wrong-global-post/)
 * Hi,
    Thanks for this very great plugin.
 * I noticed a small bug (well, I think it is) :
    When you use content visiblity
   on blue section in Divi Theme Builder, the wrong global $post is used, let me
   explain :
 * If I use a function to control visibility of a section in theme builder, the 
   global $post is filled with the theme builder post and not the post itself, neither
   get_the_post / get_post / global $post_id are working.
    The unique way I got 
   the post ID is with get_queried_object_id()
 * Note that this bug is only on theme builder section, not on theme builder module/
   row/column.
 * Is this a bug or I misunderstand something ?
 * Have a nice day,
    Alexandre

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jonathan Horowitz](https://wordpress.org/support/users/jhorowitz/)
 * (@jhorowitz)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wrong-global-post/#post-15246950)
 * Hi [@alexandregagner](https://wordpress.org/support/users/alexandregagner/),
 * Thank you so much for this detailed report! We’ll look into it and get back to
   you asap!

Viewing 1 replies (of 1 total)

The topic ‘Wrong global $post’ is closed to new replies.

 * ![](https://ps.w.org/content-visibility-for-divi-builder/assets/icon-256x256.
   png?rev=1359961)
 * [Content Visibility for Divi Builder](https://wordpress.org/plugins/content-visibility-for-divi-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-visibility-for-divi-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jonathan Horowitz](https://wordpress.org/support/users/jhorowitz/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/wrong-global-post/#post-15246950)
 * Status: not a support question