Title: Double Loop Problem
Last modified: March 22, 2018

---

# Double Loop Problem

 *  [doganthemes](https://wordpress.org/support/users/doganhocacontact/)
 * (@doganhocacontact)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/double-loop-problem/)
 * I want to make two loops for my index page. the first one should include titles
   and contents and the other one should include only titles. i did it and they 
   are working but there is a problem. when i click a title then in the title loop
   there will be shown only the title i clicked. but i want to show there all titles
   even if i clicked a title. how can i fix it?
 * **the titles loop code: **
 *     ```
       <?php if ( have_posts() ) : while ( have_posts() ) : the_post();  ?>
       <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
        <?php endwhile; else: ?>
       <?php _e('There is no post yet.'); ?>
       <?php endif; ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [hanheg](https://wordpress.org/support/users/hanheg/)
 * (@hanheg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/double-loop-problem/#post-10107428)
 * Not sure if I understand the question. But the_permalink makes a link to the 
   post single page. If you don’t want that you have to replace
    `php the_permalink();`
   with something else.
    -  This reply was modified 8 years, 2 months ago by [hanheg](https://wordpress.org/support/users/hanheg/).

Viewing 1 replies (of 1 total)

The topic ‘Double Loop Problem’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [loop problem](https://wordpress.org/support/topic-tag/loop-problem/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [hanheg](https://wordpress.org/support/users/hanheg/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/double-loop-problem/#post-10107428)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
