ThemeShaper Forums » Thematic

[closed]

remove category description to sidebar

(2 posts)
  • Started 9 years ago by ekg1
  • Latest reply from ekg1
  • This topic is not resolved
  1. ekg1
    Member

    Hi

    I have managed to add the category description in the sidebar but i want to remove the one one the page. my code for adding it to the sidebar is

    function category_disc_display() { ?>
    <div class="catdesc">
    <?php echo category_description( $category ); ?>
    </div>;
    <?php }
    //add_action('widget_area_primary_aside', 'category_disc_display'); ?>

    The problem is i can not seem to find and remove the on (category description) on the actual page. Does anyone know the remove action i would need to use?

    Thanks

    Posted 9 years ago #
  2. ekg1
    Member

    I have managed to work it out.

    1. I copied the code from 2010's category.php

    2. In my themes function.php i then created a function (just commenting out the original code);

    function ekg_category_meta() {

    echo '<h1 class="page-title">';
    printf( __( 'Category Archives: %s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    ?></h1>
    <?php
    //$category_description = category_description();
    //if ( ! empty( $category_description ) )
    //echo '<div class="archive-meta">' . $category_description . '</div>';

    /* Run the loop for the category page to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-category.php and that will be used instead.
    */

    }

    add_action('thematic_page_title', 'ekg_category_meta');?>

    3. Then added my own code to functions.php;

    <?php
    function category_disc_display() { ?>
    <div class="catdesc"><?php echo category_description( $category ); ?></div>
    <?php }
    add_action('widget_area_primary_aside', 'category_disc_display'); ?>

    This allowed me to move (Hook) the category description to any where i wanted in the theme

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.