Links in category_description (7 posts)

  1. boetter
    Posted 9 years ago #

    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?

  2. boetter
    Posted 9 years ago #

    No suggestions?

  3. boetter
    Posted 9 years ago #

    No one?

  4. boetter
    Posted 9 years ago #

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

  5. rembem
    Posted 9 years ago #

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

  6. boetter
    Posted 9 years ago #

    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 :-)

  7. sepguy
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic