• My website is https://www.paranoidonion.com

    Essentially, I want my website to work this way:
    I want the first page to just show anything from the comics-media category with 1 post per page, but I want people to be able to use paging to navigate it. I also want the Blog page to only pick up posts from news, etc. Whenever I try querying it messes everything up. I’ve looked on tutorials and I have tried adding more complicated code to get it to work, but more than often all it does is make the paging button disappear so it is no longer a loop, and I don’t really want that. Whenever the paging button is there it gives me a 404 error. I also know my permalinks are probably an issue, and I am a bit worried about that.

    I know this is a really common problem and there are lots of threads on it, and I just want to assure everyone that I have read many of them, looked up videos, tried various code snippets and I’m still having difficulty. I don’t really understand PHP well at all and most of the tutorials throw me off, because the extent of my knowledge is really just CSS and HTML and PHP is all new and foreign to me.

    I’m also interested in if there is something I can do as an alternate to query that is less faulty/complicated

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter paranoid-onion

    (@paranoid-onion)

    I tried figuring out comicpress, but I’m not exactly sure if that is any better for me being I’d have to relayout the whole theme again

    Thread Starter paranoid-onion

    (@paranoid-onion)

    Before I switch the theme and try to work out other solutions, here is what my code looks like under the theme I’m having trouble with. It is a generic wordpress theme.

    <?php $temporary = $wp_query; // set the defined new query
    	query_posts('showposts=3&cat=comics-media');
    	if(have_posts()) : while(have_posts()) : the_post(); ?>
    POST JARGON
    <?php endwhile; ?>
    
    	<?php if (next_posts_link() || previous_posts_link()): ?>
    	<?php next_posts_link('&laquo; Older Entries') ?> | <?php previous_posts_link('Newer Entries &raquo;') ?>
    	<?php endif ?>
    
    <?php else : ?>
    
    	<h2>Not Found</h2>
    	<p>Sorry, but you are looking for something that isn't here.</p>
    	<?php get_search_form(); ?>
    
    <?php endif;
    	$wp_query = $temporary; //reset it back to normal ?>
    Moderator keesiemeijer

    (@keesiemeijer)

    If I read it right you want this
    homepage : only comics media category with paging (next an previous post)
    blogpage: all other categories

    Do you have multiple loops that mess things up?
    Did you try the wp_reset_query() after the first loop

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Catagory queries breaking the paging’ is closed to new replies.