WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' CASE p.post_type WHEN 'page' THEN 2 WHEN 'post' THEN 1 ELSE 0 END DESC ' at line 10]
SELECT post_type, post_name FROM wp_posts p LEFT JOIN wp_icl_translations t ON t.element_id = p.ID AND CONCAT('post_', p.post_type) = t.element_type AND p.post_type IN ('post','page','product','product_variation' ) WHERE post_name = 'body-massage' AND post_type IN ('post', 'page', 'attachment', 'blocks', 'product', 'newsletter', 'testimonial', 'featured_item') AND post_status = 'publish' , CASE p.post_type WHEN 'page' THEN 2 WHEN 'post' THEN 1 ELSE 0 END DESC LIMIT 1

Notice: Trying to get property of non-object in /usr/www/users/bellabh/wp-content/plugins/myMail/classes/frontpage.class.php on line 215 Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/bellabh/wp-includes/wp-db.php:1357) in /usr/www/users/bellabh/wp-includes/pluggable.php on line 1167