The MU forums have moved to WordPress.org

Sitewide Tags - post limit of 5? (8 posts)

  1. truck808
    Member
    Posted 13 years ago #

    Hello. We are using sitewide tags to aggregate blog posts but, it seems that there is a default limit of 5 posts when listing a global category?

    example: http://www2.nya.org/global-cat-test-page/

    Is there a way to list more than 5 posts? Do we have to edit the plugin?

    Also would like to add a more button that links to an archive of the global category.

    Thanks!

    Robert

  2. andrea_r
    Moderator
    Posted 13 years ago #

    I'm getting a 404 on that link.

    the sitewide tags plugin does not limit how many posts to list. If you're asking how many posts to show on the category archives page?

  3. truck808
    Member
    Posted 13 years ago #

    Grrrrr! I posted the wrong link.

    http://www2.nya.org/global-cats-test/

    You'll see that only 5 posts appear when I've created 6.

  4. andrea_r
    Moderator
    Posted 13 years ago #

    Again, it's not MU and it's not the plugin.

    your theme doesn't contain the previous /next navigation hooks to show posts pasts the per-page settings.

    Check the settings to show how many posts can go on a page. Settings -> reading. Seems to be set to 5, not 10 which is default.

    I checked the source of the page and you don't have the links there to go back further than those posts either.

    http://codex.wordpress.org/Next_and_Previous_Links

  5. truck808
    Member
    Posted 13 years ago #

    Thanks! The reading settings are definitely set to the default of 10 which makes me think that the code we inserted is either wrong or in the wrong place?

    <div class="column" id="main_column">

    <div id="page" class="page_content">

    <h2>Alumni News</h2>

    <?php
    switch_to_blog(14);
    $newsposts = get_posts('cat=17');
    foreach($newsposts as $post) :
    setup_postdata($post);
    ?>
    <hr />

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <h3>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h3>
    <p class="postmetadata">
    Posted by <span><?php the_author(); ?></span>   |   <span><?php the_time('F j, Y') ?></span>
    </p>

    <div class="entry">
    <?php the_content('<p>More »</p>'); ?>
    </div>
    </div>
    <?php
    endforeach;
    restore_current_blog();
    ?>

    </div>

    </div>

  6. andrea_r
    Moderator
    Posted 13 years ago #

    So, just so I have this clear, from the code above you want to pull the posts from category 17 from, blog 14 and display them in another blog.

    Have I got that bit right so far?

  7. truck808
    Member
    Posted 13 years ago #

    yes. blog 14 is my tags blog (using sitewide tags) and 17 is the category that I am displaying on the page of the main site.

  8. truck808
    Member
    Posted 13 years ago #

    I tried this for this page but I'm still only seeing 5 posts:

    <?php
    switch_to_blog(14);
    $newsposts = get_posts('numberposts=9&cat=30');
    foreach($newsposts as $post) :
    setup_postdata($post);
    ?>

About this Topic

  • Started 13 years ago by truck808
  • Latest reply from truck808