Date not always showing

Forums › Forums › Search & Filter Pro › Date not always showing

Tagged: ,

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)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.