Pull the Category Description ONLY if a description is available.


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php if (strlen(trim(category_description())) > 0 && trim(category_description()) != "<br />") {
  2. echo "<div id='catdesc'>";
  3. echo category_description();
  4. echo "</div>";
  5. }
  6. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.