Include Category Description in search result


I have pulled Category Description data

        $taxonomies=  array('taxonomy'=>'area-type');
        $terms = get_terms($taxonomies,'orderby=id&hide_empty=0');
        $count = count($terms);
        if ($count > 0) {
                foreach ($terms as $term) {

                    $id =str_replace("#","",$term->slug);
                    $term_desc .= '<div id="nav_menu_desc_'. $id . '"class="section hidden formateIt">'. wpautop($term->description) .'</div>';    
                    echo $term_desc ;   
        }   ?> 

And did show hide on click on a Category plus added #categoryName in url so client feel that it’s a different page.

Sorry for this i am fresher in wordpress. So now problem is that they need Category Detail page which i have display with show hide they want that in search result how can i achieve this

Page link e.g :

On Click of Category it’s turn to

Sorry i was not able to add Category in before page name and now they have added 50 pages and i have to fix this

Mikul Gohil 10 years 2013-06-12T10:28:24-05:00 0 Answers 67 views 0

Leave an answer