Using WP_Query returns problem in the editor (the_content is missing) #17965
somtam
announced in
Developers Community
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I set the Woocommerce products as a post type that I want to edit directly with the Elementor editor.
It was driving me crazy the fact that sometimes I received the error message about the "the_content" function missing, because it is not.
The problem is given when it is used the WP_Query instance or get_posts (followed by wp_reset_postdata()).
Even if I isolate the code with an
if(!is_admin)
it doesn't work probably because the Elemento editor try to render as it were in the front end.Any solution?
PS: googling I see many people have the message about "the_content" function is missing and there is quite confusion over this topic. Probably their theme / plugin are also using wp_query or get posts.
Beta Was this translation helpful? Give feedback.
All reactions