category_archive_meta

Filter the default Twenty Eleven category description.

Description

apply_filters( 'category_archive_meta', (string) $div_class_category_archive_meta_category_description_div ); 

Parameters (1)

0. $div_class_category_archive_meta_category_description_div — Optional. (string) => '
' . $category_description . '
'
The div class category archive meta category description div.

Usage

To run the hook, copy the example below.
  1. $div_class_category_archive_meta_category_description_div = apply_filters( 'category_archive_meta', $div_class_category_archive_meta_category_description_div ); 
  2.  
  3. if ( !empty( $div_class_category_archive_meta_category_description_div ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the category_archive_meta callback 
  2. function filter_category_archive_meta( $div_class_category_archive_meta_category_description_div ) { 
  3. // make filter magic happen here... 
  4. return $div_class_category_archive_meta_category_description_div
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'category_archive_meta', 'filter_category_archive_meta', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'category_archive_meta', 'filter_category_archive_meta', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/category.php  
  1. echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );