Adding the permalink to the post title in the sidebar.
-
For my site I’m including the post’s title in the sidebar, I know this sounds odd, but the design call for it. The main loop is defined in the index.php file, and I’m including an additional query in the sidebar to show the title.
My issue is that I’m not sure how to echo both the title and the associated permalink.
Here is my code:
<?php // The Query query_posts( $args ); // The Loop while ( have_posts() ) : the_post(); echo the_title(); endwhile; // Reset Query wp_reset_query(); ?>
Here is my site: https://svadsi.info/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding the permalink to the post title in the sidebar.’ is closed to new replies.