Support » Fixing WordPress » Links in category_description

  • I am currently trying to make a link inside my category_description, but it only shows up as text, without the href.

    I suppose this a function in WordPress stripping the href part, but how do I disable this? Or rather, is there another way of making links inside category descriptions?

Viewing 6 replies - 1 through 6 (of 6 total)
  • No suggestions?

    No one?

    Solved it by removing add_filters in line 105 in admin-db.php 🙂

    Thanks Boetter! I was searching for the same answers. Your solution works.



    I can get quite nasty if you put these description into a title description for your category links. Your site will then ultimately break, but as long as you keep of that part it will be fine.

    Glad I could help 🙂

    Hi, just to add to this, on version 2.1 you need to edit out this line:

    //$category_description = apply_filters(‘pre_category_description’, $category_description);

    and if you want to add text into the category pages, you should refer here

    and use this code

    <?php if ( $paged < 2 ) { // Do stuff specific to first page?>
    <?php if ( is_category() ) : ?>
    <h2 id=”category-name-header”><?php echo $cache_categories[$cat]->cat_name ?></h2>
    <?php add_filter(‘category_description’, ‘wpautop’); ?>
    <?php add_filter(‘category_description’, ‘wptexturize’); ?>
    <div id=”category-description”>
    <?php echo category_description(); ?>
    <?php endif; ?>
    <?php } else { // Do stuff specific to non-first page ?>
    <?php } ?>

    in the admin template just above

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

    and it shoudl all work fine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Links in category_description’ is closed to new replies.