Forum Replies Created

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

    (@mcdworkshop)

    Thank you Mark, that is exactly what happened. I had erased users directly from the database because I was in there already having a panic attack searching for bad code after reading some articles. Sometimes I don’t know who destroys my websites more effectively, hacker types or me over-reacting and erasing all my users and chunks of websites…

    I have my /page/2/ etc. problem solved with this code:

    <?php
    if (have_posts()) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("category_name=Blog&paged=$paged");
    }
    ?>

    replacing what I used to have:

    <?php query_posts('category_name=Blog&showposts=10'); ?>

    It was all explained in this post in the forum:
    http://wordpress.org/support/topic/57912

    I too have the /page/2/ problem in my custom theme in which just page 1’s content is displayed on page 1, 2, 3 and so on. I looked at the codex documentation and couldn’t figure out what would be the solution for this problem. I did try using:

    query_posts('category_name=Blog&posts_per_page=-1');

    which did indeed output all of my posts in the Blog category, but of course no pagination. My goal is to output 10 posts at a time and have the next pages link to the next older 10 posts in the same category, and so on.

    Here are the specifics of my issue:

    I am using a custom permalink structure in order to achieve my plan for my site:
    /%category%/%postname%/

    The way I am making my site is to have different pages use query_posts() to retrieve only posts from specific categories, one corresponding to each page. I also have a /blog/ page that will retrieve all posts categorized “blog”, and format them to look like blog posts.

    My original query was:
    query_posts('category_name=Blog&showposts=10');

    and that had the /page/2/ problem.

    I also tried:
    query_posts('category_name=Blog&posts_per_page=10');

    after reading the above linked (by alvarix) codex page, but that produced the same results. Does anyone have any ideas as to what I’m doing wrong? What other information can I provide to help you decipher my issue?

    I would love to know if someone has an answer because I had planned my website’s information design all around this concept of pages displaying only specifically categorized posts (and I figured the pagination would automatically work).

    This is where I originally researched the approach:
    http://wordpressgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/

Viewing 3 replies - 1 through 3 (of 3 total)