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)