Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 461 through 470 (of 1,224 total)
  • Author
    Search Results
  • #186571

    In reply to: Assign a color


    Anonymous
    Inactive

    Each post only ever have one taxonomy department. Can you help me with this custom coding of results.php ?

    Thanks.

    #186565

    In reply to: Assign a color


    Trevor
    Participant

    Hi, does each post only ever have one taxonomy department, and if it does, it would require custom coding of the results.php being used to output the taxonomy term in the h2 and bloc-consult div. And then use custom css to add the colors to relate to these.

    #186561

    In reply to: Assign a color


    Anonymous
    Inactive

    Hi,

    Thanks for your response.
    I want this result : https://tourismequestre-auvergnerhonealpes.fr/images/results.jpg on my page results.php
    Color of title and button according to taxonomy term “Tous les départements”

    Thanks,

    Karine

    #186479

    Anonymous
    Inactive

    Hello,

    So I have a 3 part question, but first will explain how I’m using S&F.

    On my blog, I currently have a full width featured post, which I’m pulling in using WP_Query based on a ACF field value. So this is outside of the results.php (well [id#].php) loop.

    Then below the featured post, I’m using S&F to load the rest of my posts. The filter select fields are at the top of the page.

    So my first issue is when the user clicks on “older posts” pagination link at the bottom, I want to hide the featured post at the top of the page. Normally if the 2nd page of results wasn’t being loaded by ajax, I could use is_paged() or !is_paged() to conditionally load the featured post. But that obviously doesn’t work because it’s only doing a partial page reload. So do you know of anyway to hide an element outside the loop if not on the first page of results….when using ajax? I was hoping there was more elegant way of doing this other than using jquery to hide based off of the URL’s query string parameters.

    My second issue is more of why is this happening rather than how I do I do this as with my first issue.

    In the results template there are two pagination being loaded, one before the results and one after. The design only shows it having pagination on the bottom of the results, so I took out the first. The issue is when I click on “older posts” it jumps me down to the bottom of the page. If I scroll back up, I can see the 2nd page of results.

    Now if I move pagination before the results, it works fine and keeps me where I’m at on the page. It’s if the pagination is after (below) the results that it automatically drops me to the bottom of the page where the results are out of view.

    Finally, I was wondering if there is a way to show X number of posts on the first page of results, but then show Y number of results on the rest of the paginated pages? My first page has certain elements that I will removing on pagination pages, so if I go with the number of posts that I want to show on my first page, then the page will look a bit sparse on the older posts pages.

    Thanks!


    Anonymous
    Inactive

    Yes the filters are functioning properly. But the displayed results are what I’m having trouble with. I updated the results.php template and put it into wp-content / themes / headwaychild / search-filter / results.php. In this template I switched things around. I would like the featured image to display first, then remove the excerpt and categories and date. But my results still shows it the same way as before.
    Screen Shot: https://www.dropbox.com/s/scbyjq8kn6n6k9y/mcmscreenshot08212018.jpeg?dl=0
    Screen Shot With Notes: https://www.dropbox.com/s/1nc4cbxzk903sh6/mcmscreenshot08212018-notes.jpg?dl=0
    Results.php file: https://www.dropbox.com/s/ijl0d8rz1xuuwub/results.php?dl=0

    #185991

    Anonymous
    Inactive

    Sorry – you have lost me.

    I want to get the search and filter plugin to search through the ACF fields I am using on the site. How can I set up the search function so it does this – I understand I need to edit the results.php code to add in relevant placeholders to fetch back the ACF fields there – but how can I specify / make sure that the search function is looking through the ACF fields?

    #185960

    Trevor
    Participant

    Ah. So, you are using the shortcode results method, and you want to display ACF data. The guide to customising the appearance of the results is here:

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

    You will need to do that first and then use the ACF documentation to add your own HTML/PHP to output as you want. This search will give you some snippets already posted on our forum:

    https://support.searchandfilter.com/forums/search/results.php+acf+get_field/

    For example, this post (and thread):

    https://support.searchandfilter.com/forums/topic/output-acf-post-object-fields-in-results/#post-102009

    #185922

    Anonymous
    Inactive

    Hey Trevor,
    Thanks first of all.
    The site is: http://devcenter.pt/aptcci/directorio-de-psicoterapeutas/
    In the template I changed the_excerpt(); for the_content(); at /templates/results.php
    Thanks bro

    #185878

    Anonymous
    Inactive

    Hi – yes, using standard shortcodes – so, I need to edit the results.php template as above to make it work as we need do I?

    #185868

    Trevor
    Participant

    If you are using the Shortcode results method, and our results.php template file, it would look like this:

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1024)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // your template archive code/loop OR results.php code here
    }

    Change 1024 to the ID number of your form (from the form shortcode).

Viewing 10 results - 461 through 470 (of 1,224 total)