WP_query returns error when used for custom widget
UPDATE: Okay, Looking at the Error, it should be easy. Just remove any Whitespaces or Clear Lines at the end of your Plugin file after the last “?>”. http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc Did you copy&paste the code here? Because it seems like you have some whitespaces that should not be there in the line <?php if ($the_query->have_posts()) : … Read more