officialsm
Member
Posted 3 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?
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.
officialsm
Member
Posted 3 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
officialsm
Member
Posted 3 years ago #
Can we see a link to what you are working on?