WordPress.org

Forums

How do I edit the number of posts on a tag page? (5 posts)

  1. ImSteveSwisher
    Member
    Posted 4 years ago #

    Here is my issue:

    -I have the wordpress default post number set to 2 (for my homepage display)
    -I use the Smart Category Ordering plugin that lets me set my Categories to display 4 on my category pages

    but

    -By default my Tag pages are showing 2 posts and I would like them to show 4 as well.

    How can I set this?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    You could use a custom query in your tag template:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'posts_per_page' => 4,
    	'paged' => $paged
    );
    query_posts($args);
    ?>

    http://codex.wordpress.org/Function_Reference/query_posts

  3. ImSteveSwisher
    Member
    Posted 4 years ago #

    Sorry Esmi, but ive been so busy I forgot all about this post until now. I looked into what your saying and I understand it to some extend but I am only a beginner/intermediate when it comes to this stuff... If you could be a little more specific? By tag template, do you mean say, archive.php? Also, where in the file should I place the query?

  4. ImSteveSwisher
    Member
    Posted 4 years ago #

    Bump?

  5. ImSteveSwisher
    Member
    Posted 4 years ago #

    NVM, I read up on Querys and played around for a while. I think I got it, thanks!

    It still would be nice if the Smart Category Ordering plugin worked for Tag Archives. If you would like to see this feature too, contact them and request it be added!

    http://tierra-innovation.com/wordpress-cms/plugins/smart-category-ordering/

    wordpress-cms@tierra-innovation.com

Topic Closed

This topic has been closed to new replies.

About this Topic