• Resolved dessine-moi une histoire

    (@dessine-moi-une-histoire)


    Hi,
    I would like to add a category description. Is Raindrops support the display of category descriptions or Is there a code to add?
    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andre

    (@creativedreams91)

    http://en.support.wordpress.com/posts/categories/

    Go to your Dashboard.
    Hover over the Post tab. You will then see a drop down menu of Categories.
    This will allow you to add the categories you need.

    Also in the widgets you can edit how the categories will display on the live site.

    Hope this helps you out. Let me know

    Theme Author nobita

    (@nobita)

    Hi dessine-moi une histoire

    Since there is no appropriate hook, I will consider the future.

    Of the following ways, if in the current theme, and do somehow.

    It is a drawback to use the span element, it’s not possible to use html tags

    Add to functions.php first line (<?php before ).

    <?php
    add_filter( 'raindrops_archive_value', 'my_add_category_description' );
    
    function my_add_category_description( $title ) {
        if( is_category() ) {
    	return $title .'</span><span style="display:block;font-size:13px;">'.wp_html_excerpt( category_description( get_query_var( 'cat') ),50,'...');
        }
        return $title;
    }
    ?>

    Thank you

    Thread Starter dessine-moi une histoire

    (@dessine-moi-une-histoire)

    Hi Nobita
    I put this code in functions.php via FTP but my description didn’t appear.
    I also tried to add in archive.php :

    <?php echo category_description(); ?>
    <?php
    if(!(is_paged())){
    echo category_description();
    }
    ?>

    But nothing happen too

    Theme Author nobita

    (@nobita)

    Need category ID

    category_description( get_query_var( 'cat') )

    Thread Starter dessine-moi une histoire

    (@dessine-moi-une-histoire)

    Sorry I’m very novice.
    Where do I have to add this code?

    Theme Author nobita

    (@nobita)

    loop.php change below

    raindrops_prepend_loop();
    
    		raindrops_next_prev_links( );
    
    		if ( have_posts( ) ) {
    
    			raindrops_loop_title( );
    
    			if ( is_category() ) {
    
    				echo '<li>'. category_description( get_query_var( 'cat') ). '</li>';
    			}

    Thread Starter dessine-moi une histoire

    (@dessine-moi-une-histoire)

    Thank you very much

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘category descriptions’ is closed to new replies.