• Resolved madcore

    (@madcore)


    Hi folks.

    I want to show in some categories more than the ten posts per page i′ve defined in the options page. For example, 30 in category 4, only one in category 6, etc… I′ve searched in the codex one way to do this, but didn′t found anything. How can I do this, if there is a way to make that?

    Thanks to all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I believe Custom Query String might help you:
    https://drunkenmonkey.org/user/archive/custom-query-string-2.6.zip

    Thread Starter madcore

    (@madcore)

    Thanks MichaelH. I′m going to download and give it a try ^_^.

    Anyway, I′ve found a solution by myself using the customizable post listings plugin, making some changes on one of the docs I′ve found on the codex. This is my lines:


    <?php get_header(); ?>
    <?php if ( in_category(4) || in_category (8) || in_category (9) || in_category (10) || in_category (11) || in_category (12) || in_category (13) || in_category (14) || in_category (21) || in_category (24) || in_category (35) || in_category (36) ) {
    $wp_query->query_vars['cat'];
    echo '<div id="content"><div id="thumb-gallery">';
    c2c_get_recent_posts(1000, "%post_excerpt%", $cat);
    echo '</div></div><div id="sidebar">

      ';
      if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) :
      else :
      endif;
      echo '

    </div>';
    } else {
    echo '<div id="content">?que?';
    echo '</div>';
    get_sidebar();
    }
    ?>
    <?php get_footer(); ?>

    In the codex example, the $wp_query->query_vars['cat'] goes inside the plugin function. That gives an sql error in my page. But putting that line outside and before the plugin makes it work perfect. I hope this can be helpfull in anyway to somebody.

    Again, thanks for your help, MichaelH.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the number of posts shown in diferent categories’ is closed to new replies.