WordPress.org

Forums

Categories (13 posts)

  1. Jason
    Member
    Posted 11 years ago #

    Could you post a link?
    Have you checked out http://wiki.wordpress.org/index.php/TemplateTags#list_cats

  2. slimeboy
    Member
    Posted 11 years ago #

    When i put in
    [code]
    <?php list_cats(option_all, 'text', 'col', 'sort', 'file', list, dates, count, hide_empty); ?>
    [/code]
    I get a parse error.
    http://www.simonsrealm.net

  3. Nick Momrik
    Member
    Posted 11 years ago #

    You have to pass values to the functions....these are the default values:
    (1, 'All', = 'ID', 'asc', '', true, 0, 0, 1, 0)

  4. slimeboy
    Member
    Posted 11 years ago #

    "Parse error: parse error in /home/simon/public_html/index.php on line 84"
    [code]
    <li id="category">Category

      <?php list_cats(1, 'All', = 'ID', 'asc', '', true, 0, 0, 0, 1); ?>
  5. [/code]

  • Nick Momrik
    Member
    Posted 11 years ago #

    Whoops...remove the = symbol.

  • slimeboy
    Member
    Posted 11 years ago #

    Thanks, Now why is it not showing the number of posts after the category?
    <?php list_cats(1, 'All', 'ID', 'asc', '', true, 0, 0, 1, 1); ?>

  • Nick Momrik
    Member
    Posted 11 years ago #

    Check the link that Jason posted above to see which parameter is for the count option and make sure that you have that set to true or 1.

  • slimeboy
    Member
    Posted 11 years ago #

    <?php list_cats(1, 'All', 'ID', 'asc', '', true, 0, 0, 1, 1); ?>
    That is what i have & inless i am wrong the second last one is the count. That is sent to "1"
    http://www.simonsrealm.net

  • Nick Momrik
    Member
    Posted 11 years ago #

    Actually, it's the 8th parameter that should be set to 1. The Wiki Template tag is different than the one that I am using on my blog. Sorry about that.

  • slimeboy
    Member
    Posted 11 years ago #

    Ok, Now i have the brackets that the numbers go into but not the numbers. Any sugestions?

  • Ryan Boren
    WordPress Dev
    Posted 11 years ago #

    If you use a nightly build, you can do this:
    wp_list_cats('optioncount=1');

  • slimeboy
    Member
    Posted 11 years ago #

    No, Im not using nightly

  • slimeboy
    Member
    Posted 11 years ago #

    Any sugestions?

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.