• doganthemes

    (@doganhocacontact)


    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)
  • 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 6 years, 11 months ago by hanheg.
Viewing 1 replies (of 1 total)
  • The topic ‘Double Loop Problem’ is closed to new replies.