- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
keep getting an end syntax error. I am trying to limit the number of post displayed on a archive page. Thanks in advance.
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("posts_per_page=1&paged=".$paged);
if (have_posts()) : while (have_posts()) : the_post(); ?>
'); ?>
Try this:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts($paged . "&posts_per_page=1&paged=' .$paged);
?>
Thanks, but now I’m getting an T_endwhile error.
So I got the code to work with a lot of help, but now Im getting a 404 error when navigating to the next page. Here is my structure.
-> parent category
–> children category
All of the children are displayed on a certain page. You select the category which then displays all the post within that category. This is where I want to limit the number displayed. Hopefully that gives a better picture.
url for page that displays childern
localhost/?page_id=5
url for category selected
localhost/?cat=4
url for next post link which I get the 404 error
localhost/?cat=4&paged=2
Thanks in advance