Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 1,071 through 1,080 (of 1,224 total)
  • Author
    Search Results

  • Anonymous
    Inactive

    Im using this plugin in page http://lux.hed1n.ru/test/ with shortcodes [searchandfilter id=”3925″]
    [searchandfilter id=”3925″ show=”results”].
    If i press submit button my page looks ok, if I update it, there are some mistakes in layout.
    I changed results.php to use my html layout.

    #31290

    Ross
    Keymaster

    Hi there

    Please check the template found in search-filter-pro/templates/results.php for an example of how to display this message.

    Also see the codex: https://codex.wordpress.org/Function_Reference/have_posts

    Thanks

    #30635

    Anonymous
    Inactive

    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 ?

    #30629

    Ross
    Keymaster

    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

    #30447

    Anonymous
    Inactive

    I have customized the search results page to remove post summaries, by copying results.php into my theme template folder, and it’s working nicely. Now, I’d like to add a post meta field (“wp_review_total”) into the search results, so my display would look like:

    the_title
    ** post-meta-field **
    the_category
    the_tags

    Is this possible?

    #29976

    Anonymous
    Inactive

    Hi Ross,

    I still cannot get this to work using the results.php or my regular template loop.
    Have tried a bunch of stuff.
    Any chance of some detailed instructions on how to get this going?

    Cheers,
    Dan

    #29915

    Ross
    Keymaster

    Well somewhere in your template I think you are using really old pagination.

    Something like calls to the functions sf_paged_links

    Either way, you can find out exactly what line errors are being created and the lines with your pagination by checking your error logs.

    Then, you need to replace this with the correct usage of WP pagination. As mentioned already in the above link, this can be found in the sample template in search-filter-pro/templates/results.php

    Thanks

    #29668

    Anonymous
    Inactive

    I couldn’t get it to work as an archive. I ended up using the shortcode and just rebuilding the results.php page around your loop. I’m pretty sure it has something to do with how I was trying to use the loop in my template for the archive.

    #29371

    Ross
    Keymaster

    Hi Martin

    Did you check the included results.php for the correct way to use wp-pagenavi plugin?

    This can be found in:

    wp-content/plugins/search-filter-pro/templates/

    S&F does not use the paged variable generally, and because the shortcode runs its own query, it must be passed into the pagenavi function:

    wp_pagenavi( array( 'query' => $query ) );

    Thanks

    #29282

    Ross
    Keymaster

    Hi Yacine

    I see what you mean now.

    You cannot use S&F with custom queries – ie, you cannot wire it up to a custom WP_Query that is created somewhere else.

    What you would need to do is use S&F to create the whole query, and then customise the results.

    What I think is best to do in this case is to create the query with S&F

    http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/

    Make sure to complete the step about customising the template.

    Then the template file results.php would have your loop.

    I would then substitute the loop with the same structure as above and add in

    get_template_part( 'partials/content-download-thumbs' );

    The EDD specific support only works with EDD downloads shortcode itself.

    Thanks

Viewing 10 results - 1,071 through 1,080 (of 1,224 total)