WordPress.org

Support

Support » How-To and Troubleshooting » category_description() without and tags

category_description() without and tags

  • hello,

    i try to made new meta desciption tags for categories, and i get one problem.
    whene i use “category_description()” or evry code of show category description:
    is it show description and In the start and the end is show <p> and </p> tags.
    It’s not really relevant for me, I would like to know how I can remove the <p> tags of my category description.

    this is the code of i use:

    <?php
      if (is_category())   { echo '<meta name="description" content="'.category_description().'"/>';}
       else { echo '<!-- no meta -->';} ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘category_description() without and tags’ is closed to new replies.