WordPress.org

Ready to get started?Download WordPress

Forums

How display tags or search archive list (6 posts)

  1. officialsm
    Member
    Posted 5 years ago #

    Hi, on my website i you make a search or try to see the archive for a tag you can see only one post every time. You need to click on NEXT to see the next post.

    This happen because i set on settings to show only one post.

    But i would like to see only one post in homepage but i i try to search an archive by tags, monthly or by search i want to see alist of N posts.

    In which way i could do this?

  2. chaoskaizer
    Member
    Posted 5 years ago #

  3. kohaku
    Member
    Posted 5 years ago #

    I had this problem too. I had help with a work around. In settings, I gave a number more than one for all my archive/search/category pages. I think I have 7.

    Then on my index.php page, I put this:

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("showposts=1&paged=$page"); ?>
                    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    That made for only 1 post on my main page but multiples on others.

    Hope that helps.

  4. officialsm
    Member
    Posted 5 years ago #

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("showposts=1&paged=$page"); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    I tried without success. He work not for me.
    In my theme (WHITESPACE) i have comments.php, home.php, index.php, page.php

  5. officialsm
    Member
    Posted 5 years ago #

    Is there a easiest way?

  6. kohaku
    Member
    Posted 5 years ago #

    Can we see a link to what you are working on?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.