Forums

query_posts "showposts=" not working (2 posts)

  1. patricia1706
    Member
    Posted 1 year ago #

    I have a multilingual site (WPML) for which I need to insert a manual query. The 'showposts=??' operation is not working, in the code example below. Any thoughts? Thanks in advance!

    <?php
      if (ICL_LANGUAGE_CODE == 'en') {
     	$categories = get_categories("child_of=7&showposts=3&orderby=ID&exclude=40,38,41,42");
    	echo '<h3>English Title</h3>';
    
      } elseif (ICL_LANGUAGE_CODE == 'es') {
     $categories = get_categories("child_of=10&showposts=3&orderby=ID&exclude=39,43,44,45");
        echo '<h3>Spanish Title</h3>';
      }
    ?>
    		<?php foreach ($categories as $cat) { ?>
            <?php query_posts("cat=$cat->cat_ID&showposts=6"); ?>
    
    	<Do stuff>
    
    <?php }?>
  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    get_categories() does not have a parameter 'showposts'

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

    what is the more precise description of 'not working'?

    does <Do stuff> include a wordpress loop?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags