Support » Plugin: Ajaxy Live Search » [Plugin: Ajaxy Live Search] Category for Results

  • I am trying to display the category of results after the title. Currently it is displaying the date and author. I know how to modify this in the template files. This is what I concluded as the solution use {post_category} and insert the following code after
    $pst = get_post($result->ID);

    in sf.php:

    $post_category = get_the_category( $pst->ID, 'echo $category[0]->cat_name');
    $pst->post_category = $post_category;

    However, it is displaying [object Object]. What should I do?

    http://wordpress.org/extend/plugins/ajaxy-search-form/

Viewing 1 replies (of 1 total)
  • Plugin Author Naji Amer

    (@n-for-all)

    $pst->post_category = $post_category[0]->cat_name;

    since get_the_category return an array of categories objects that the post belongs to

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Ajaxy Live Search] Category for Results’ is closed to new replies.