From the category_description( $category_id )
parameters description:
Category ID. Will use global category ID by default.
This means that if you are intending to use the global id, you don’t need to insert the variable $category_id
which may be undefined in your use of the function. I’m assuming it is undefined because it is not listed in the global variables. This is the default use of the function which will use the ID of 0:
echo category_description();
Otherwise, if you want the description of a specific category, pass the ID of that category as an argument, such as:
echo category_description( 3 ); //gets the description for category with the ID of 3
Related Posts:
- How to check if I’m on the last page of posts?
- Get top parent category
- Category page doesn’t use category.php, instead it redirects to homepage
- wp_update_nav_menu_item() to insert categories
- How to exclude uncategorized from permalink structure /%category%/%postname%/
- Redirecting specific category posts to subdomain
- Create product category and keyword search form in woocommerce? [closed]
- Get child categories when clicking on parent category
- How can I create a loop to build slides based on multiple categories using Coda Slider
- Saving two categories from two dropdowns in front end posting form
- Block multiple categories from Blog
- Best and Cleanest way to remove /category/ from category permalinks? [duplicate]
- Categories list loop – add separator every year
- How would you create a “weekly” archive?
- Exclude most recent posts from specific category in wp_query()
- wp_list_categories to show list of categories and the description
- How to display a description of a given category from a custom taxonomy
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Filtering by Category doesnt paginate correctly on the backend
- Direct link to category?
- How to modify category.php to list posts alphabetically?
- Categories vs. Page Site Organization
- Sorting posts by season
- Open subcategories in submenu on click in primary menu
- How to add Categories to the top menu of the website?
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- Create blog page only to see one category
- how to show the post category name
- Find out which user created a category or tag?
- ACF: Display category name using taxonomy field
- Post in multiple categories
- Mod_Rewrite to show only last subcategory in URL
- wp_dropdown_categories() scripts working erratically on sidebar
- Access current post parent and sub category
- How to exclude the last post from a category(featured for example) from the main loop?
- menu using category and tags
- Have parent category contain only one post?
- wp e-commerce group product by category [closed]
- Sticky post for each category on category pages [duplicate]
- Limit get_categories to show each category once
- get parent category only
- “Item not updated” when try to change category properties
- How can I tell what category I’m in– in the header?
- new WP_Query all post in a category inside the loop
- How to add orderby parameter for sorting on category.php
- delete category name in the pages
- How to display sticky or latest published post on the current category page it belongs to?
- Category tags with comma’s
- Trying to create a Categorised Index (archive?) to use as my Home Page
- Filter posts by categories ajax is showing nothing
- How to display child categories of all parent category within a singe loop?
- How can I add a class to displays a category?
- How to show only the name of one category above each posts in frontpage?
- WP_Query – using category__and when one of the categories is 0
- Multiple categories for one menu item?
- Hide categories from frontend, but not admin / post editor
- Exclude categories from homepage not longer working
- Remove category link
- javascripts files not linking to my category slugs?
- Post to inherit custom category background image from parent
- Related posts widget – category
- Editing Loop So It Targets Specific Tags?
- Pretty URLs with Categories and Tags
- Select posts that match multiple category names, must match all categories listed
- How can i display category title over thumbnail?
- Header Link function not working. Problem with bloginfo()
- WordPress category filters as subcategories
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types
- Need help with major category and permalink re-organization
- Include home page template in specific category template
- How to use category slug with a regular page
- Modifying category order
- display current portfolio categories from a specific parent
- Please tell how to stop the category from showing up on posts
- how to get only grandchild category from a child category
- Editing categories crashes WordPress site
- Remove “category” from permalink with add_rewrite_rule
- Next and previous links category infinite loop
- How to hook into creating a category?
- show only terms from parent category
- show posts in archive page based on selected catagory
- Accessible Subcategory URL’s pages without using .php hack
- How to display total views of all posts of one category?
- Get the categorie name of Event Organiser plugin [closed]
- get_categories returns top-level categories instead of child categories
- Show posts from all categories
- Grouping parent categories into sections
- How to show “category” name?
- Display the category name of a post that is in two different categories
- filter single_cat_title avoiding the breadcrumbs
- htaccess redirect for all categories converted to tags now showing 404
- Category page with gallery for each post
- (WordPress) How to get custom taxonomy parent name?
- Show one same template for two category
- Search functionality with multiple categories
- Make a menu visible for a single category and it’s content
- WordPress Loop Prob
- WooCommerce category display in custom page
- How to define category ID in an array?
- Restricted category in Woocommerce [closed]