Forums

Adding the permalink to the post title in the sidebar. (3 posts)

  1. meganlee1984
    Member
    Posted 10 months ago #

    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: http://svadsi.info/

  2. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

  3. meganlee1984
    Member
    Posted 10 months ago #

    Thank you!

Reply

You must log in to post.

About this Topic