Default Results

Forums › Forums › Search & Filter Pro › Default Results

Viewing 6 posts – 1 through 6 (of 6 total)
  • Anonymous
    #270380

    Hey I would like to customize the content that is being displayed at the very beginning (before using the filter). As for now it shows all entries, but I would like it to show a blog post instead. Is it possible to insert the blog post’s link somehow?

    Thank you!

    website: https://urban-digital.de/kommunale-digitalisierungsstrategien-uebersicht/

    Trevor
    #270393

    Yes, that is possible. I see that you are using our Shortcode method …

    … in which case you should follow the ‘guide to customising’:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    Once you have a copy of the results.php file in a search-filter sub-folder of your theme, you can edit that file, like this (leave the PHP comments at the top outside and before this code):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(10265)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()==””)) {
    // code to display the blog post here
    } else {
    // the current resuts.php code here
    }

    Anonymous
    #270439

    Hi, thanks for answering my question but I did not quite get the code steps.

    1. I created the folder.
    2. I have a copy of the results.php file
    3. How can I now make the following post to be shown as the starting page in my display of results-area?

    https://urban-digital.de/10374-2/

    Trevor
    #270495

    You would need to write the code for that yourself, or seek the assistance of a third party coder.

    Anonymous
    #270510

    Sorry but I don’t understand your statement. In the above-mentioned post you provide me a link that doesn’t work (it shows “Page 404”). The only thing that I’m kindly asking for is that you let me know how I can show a post instead of all results at the beginning.

    Trevor
    #270512
Viewing 6 posts – 1 through 6 (of 6 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.