Unknown system variable ‘post_content’

Question

Why Error – Unknown system variable ‘post_content’

foreach( $posts as $post ) {

            $post_content = $this->add_image_dimensions( $post->post_content );

            if( $post_content != $post->post_content ) {

                $query = "UPDATE " . $wpdb->prefix . "posts";
                $query = " SET post_content = '" . $post_content . "' WHERE ID = " . $post->ID;

                $wpdb->query( $query );

            }

Sorry for my English

0
UserUser-name 2 years 2020-10-24T15:10:18-05:00 0 Answers 15 views 0

Leave an answer

Browse
Browse