How to link the title adding a permalink?
Following your code strictly you’d want … $dl .= ‘<dt><a href=”‘.get_permalink($wp_query->post->ID).'”>’ . $wp_query->post->post_title . ‘</a></dt>’; … but you are using the WP_Query object in a very atypical way. You are sort-of brute forcing your way through the Loop instead of using the methods and template functions built into the core. For example: while ( $query->have_posts() … Read more