• how can i display the number of posts in a category?
    how can i display the number of posts in a category on the catgory main menu?
    example:
    category 1 (111) category 2 (222) category 3 (333)

    in other words
    category 1 = 111 posts
    category 2 = 222 posts
    category 3 = 333 posts

Viewing 9 replies - 1 through 9 (of 9 total)
  • Ok, are these two questions or are you just asking how to show the count next to your menu items?

    How are you generating the category list?

    EDIT: No need to answer if Michaels advice above helps.

    Thread Starter maordany

    (@maordany)

    From what I understand the first responder wrote what I need but I do not understand where I write the code.

    Ok, so i’ll refer back to my question, how are you generating the category list?

    If you can provide some information on how the list is generated i should be able to help.

    ??

    Thread Starter maordany

    (@maordany)

    my category php code is.
    Category Template (category.php)

    <?php
    global $options;
    foreach ($options as $value) {
    if (get_option( $value[‘id’] ) === FALSE) { $$value[‘id’] = $value[‘std’]; }
    else { $$value[‘id’] = get_option( $value[‘id’] ); }
    }
    ?>

    <?php get_header() ?>

    <div id=”container”>
    <div id=”content”>

    <?php thematic_page_title() ?>

    <?php thematic_navigation_above();?>

    <?php thematic_above_categoryloop() ?>

    <?php thematic_categoryloop() ?>

    <?php thematic_below_categoryloop() ?>

    <?php thematic_navigation_below();?>

    </div><!– #content –>
    </div><!– #container –>

    <?php thematic_sidebar() ?>
    <?php get_footer() ?>

    Are you sure that above code creates a list of categories? I’m pretty sure the above code is for displaying posts in a category..

    Ok, i’ll try to make this a bit easier, where is the menu situated that you’re trying to adjust to include the count on?

    If you can provide a link to your site it would help a great deal to.

    Thread Starter maordany

    (@maordany)

    joom24.com

    the catecorys:
    “JOOMLA 1.5” “JOOMLA 1.5 LAGACY” “JOOMLA FAQ” “VIDEO GUIDES”

    I understand that it is clear that I do not know much
    Thank you very much for the help ??

    Thread Starter maordany

    (@maordany)

    i fine the code.

    [Moderated: Too much code. Please consider placing the code in a text file on your site with a link here -or- use a pastebin service such as https://wordpress.pastebin.com. Thanks!]

    Instead of the original code:
    <?php wp_list_categories(‘title_li=&number=7’); ?>

    I wrote the code
    <?php wp_list_categories(‘title_li=&number=7&show_count=1’); ?>

    But instead It will write it in the Same row It was recorded in two rows. Why?

    I’m not sure what you mean, are you saying the display is messed up / changed, when adding the count?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘how can i display the number of posts in a category?’ is closed to new replies.