It seems we can’t find what you’re looking for. Perhaps searching can help.
function latest_posts_widget() {
echo "
Debug: Hook Loaded
"; $latest_posts = new WP_Query(array( 'posts_per_page' => -1, 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC' )); if ($latest_posts->have_posts()) { echo "Debug: Posts Found
"; echo "- ";
while ($latest_posts->have_posts()) {
$latest_posts->the_post();
echo "
- " . esc_html(get_the_title()) . " - " . esc_html(get_the_date()) . " "; } echo "
Debug: No Posts Found
"; } } add_action('generate_after_right_sidebar_content', 'latest_posts_widget');