Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Add category description on taxonomy page (like categories, actions, cities, areas)

This topic contains 2 replies, has 2 voices, and was last updated by  Anna 1 year, 11 months ago.

  • Author
    Posts
  • #123132

    Anna
    Keymaster

    How you can make the category description show on taxonomy page – show as text on taxonomy page.

    Answer applies for theme version up to v 1.11

    Use this code here https://codex.wordpress.org/Function_Reference/category_description

    In taxonomy.php

    Place above filters (you copy the code above this line)

    <!-Filters start here->

    Thank you

  • #123140

    absimp
    Participant

    So I use this code?

    <?php echo category_description( $category_id ); ?>

    I’m looking in taxonomy.php and cannot find this:

    < !-Filters start here->

    Can you confirm what line it is on?

  • #123324

    Anna
    Keymaster

    Have description in HTML, but hidden on taxonomy page:

    In Header.php you should add this code (inside head tag)

    <?php
    
    if( is_tax() ) {
    
    echo ' <meta name="description" content="'.strip_tags( term_description('', get_query_var( 'taxonomy' ) )).'" >';
    
    }
    
    ?>

    This will display the taxonomy description in header (html), for robots to index.

    Add description in taxonomy page for public view

    To add a taxonomy description on front end you need to edit normal_map_core.php or half_map_core.php (if you are using half map version)

    In there look for the is_tax if ( for ex at line 75 in normal_map_core.php) and add this code to display the description

     if( is_tax() ){
    
    echo term_description('', get_query_var( 'taxonomy' ) ) ;
    
    }

    To add the date you need to use this instruction https://codex.wordpress.org/Function_Reference/get_the_date

    If you need different code instructions, please open a ticket in our private support system and will ask my colleagues to follow up – http://support.wpestate.org/

You must be logged in to reply to this topic.