WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to fetch Default category (3 posts)

  1. deblopper.sumanta
    Member
    Posted 3 years ago #

    I am trying to fetch only the default category by wp_list_categories
    () AND get_cateories() . But I could not do this.
    Please tell me if i am doing any mistake or is there any other way to do this.

  2. Joseph
    Member
    Posted 3 years ago #

    Use get_option('default_category') to get the ID of the default category and pass that into whichever category function you'd like to use.

  3. deblopper.sumanta
    Member
    Posted 3 years ago #

    Thanks Joseph. It Works too good.

Topic Closed

This topic has been closed to new replies.

About this Topic