Forums Forums Search & Filter Pro Date not always showing

Tagged: ,

  • This topic has 15 replies, 2 voices, and was last updated 9 years ago by Ross.
Viewing 6 posts - 11 through 16 (of 16 total)
  • Anonymous
    #30589

    Hey Ross,

    Any luck ?

    I love the plugin and when you’re done checking I’m going to try and add a bit of animation to the search results using the theme’s jquery which I’m sure i’ll be able to figure out.

    Thanks for looking into this for me.

    Ross Moderator
    #30600

    Will be jumping on to this again shortly.

    Thanks

    Ross Moderator
    #30629

    Hi Daniele

    I’ve no idea what hte issue was, but the code you supplied above worked perfectly.

    I just pasted this to the top of results.php and it worked!

    If you wish to do some clever things, like hyperlink the category names or anything like that, then you would need to access the array (“Get an array of filters with values and labels”):

    http://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/#Getan_array_offilterswithvalues_and_labels

    and do some processing yourself.

    Thanks

    Anonymous
    #30635

    Hey Ross,

    Did you try it on the results.php located in the avada theme folder /search-filter ?

    I tried this again with the following two codes;

    <?php
    //Get an array of objects containing data for the current search/filter
    //replace 1526 with the ID of your search form
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(14458)->current_query();
    var_dump($sf_current_query->get_array());
    ?>

    and

    <?php
    //Get a single fields values using labels
    //replace 1526 with the ID of your search form
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(14458)->current_query();
    echo $sf_current_query->get_field_string(“_sft_category”);

    ?>

    Neither are able to pull the values I need.

    I’d like to turn the Categories In: line to not be bulleted and be on the same line. If I can pull the category then it would be fine.

    I tried the above codes at the top of the results.php and neither worked.

    Any idea why ?

    Anonymous
    #30637

    Just to be clear. The code below:

    <?php

    $sf_current_query = $searchandfilter->get(14458)->current_query();
    echo $sf_current_query->get_field_string(“_sft_category”);

    ?>

    Results: Categories: All Categories

    It doesn’t display the category that the post is assigned to when using the code:

    Categorized in: <?php the_category(); ?>

    Ross Moderator
    #30664
    This reply has been marked as private.
Viewing 6 posts - 11 through 16 (of 16 total)