WordPress.org

Ready to get started?Download WordPress

Forums

Set posts per page for tag link (1 post)

  1. Begin
    Member
    Posted 2 years ago #

    I use the get_the_tag_list to get links to my tags.
    now to have my customized way of showing the posts
    from that tag that was selected, i changed the tag.php file
    to my own structure inside a loop that starts like a regular loop
    while ( have_posts() ) : the_post();

    so then wordpress somehow (i don't really know how it's working)
    knows to get only this tag posts to the loop.

    the problem is I wan't to set the number of posts per page
    specifically for the tag.php and not from the wordpress setting
    global option to set posts per page.

    the way I do that in another page is:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('cat=9&posts_per_page=8&paged='.$paged);

    but I can't use it here because then it dosen't know to get the selcted
    tag posts only...

    Any Idea ? Thank's!

Topic Closed

This topic has been closed to new replies.

About this Topic