Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 361 through 370 (of 1,224 total)
  • Author
    Search Results
  • #202886

    Trevor
    Participant

    Sorry for the delay. I am working my way through a backlog in oldest touched order first, so I have just gotten to this one.

    Your form uses As an Archive, so I presume it is using search.php also. Note that, when using Ajax, the Page Title will not change, so it is better to set it to something generic.

    Assuming you are using a child theme (you should be), make a copy of the search.php template file and rename it, e.g. search-results.php and place this in the child theme folder.

    Then edit the the file and find the header part (on line 19 I think):

    <?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?>
    

    and replace that with some Text, like Search Results

    #202554

    In reply to: Hidden field


    Trevor
    Participant
    #202327

    Anonymous
    Inactive

    Thanks for your reply 🙂
    Sorry I’ve been at this for hours and I still can’t get this to work. I installed the divi add-on and followed the instructions. It wasn’t displaying any results so I added a test post (that was an actual wp post, not a post in the taxonomies I created). It now shows that one post – so it won’t display any of the other taxonomies that you helped me to set up. Will this method only work if I’m using posts taxonomy? Because the divi blog module usually only displays posts, but I’m no longer user any posts – they’re all under taxonomies like courses, workshops etc…tried the portfolio module and that also only shows that one test post too. And just as a side note, when I click to filter by category for that post, it doesn’t matter which category I click, the test post remains even though I only added it to one category.

    The only thing that seems to be working for me is the shortcode display. But customising the results.php page is beyond me 🙁

    #202123

    In reply to: results display


    Anonymous
    Inactive

    OK, so are we talking about the results.php file in the Templates folder, in the search-filter-pro folder?
    Do I call the new sub-folder search-filter or search-filter-pro?
    Is the ID number to replace you refer to in the above example the number here – get(36613)?
    Do I paste the entire results.php after the comment out line //?
    i.e. replace “your current results.php code here” with the complete results.php code?

    Also, how do I prevent the date of the post showing in the results?
    As far as I can see, I’ve turned off meta.

    #202121

    In reply to: results display


    Trevor
    Participant

    If you are using our Shortcode Display Results method, then the results.php needs to be modified like this (where the ID number will need to be changed to match your form ID):

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

    If using other methods, and if you have access to the template PHP files, you could use similar code.

    Make sure any files you modify are in the child theme folder (if you copy our results.php file, it needs to be in a sub-folder of the child theme, called search-filter, not our plugin folder or a parent theme folder).

    #202083

    Anonymous
    Inactive

    Hello,
    I am trying to edit results.php that i moved to created folder in my theme folder. i did some testing with echo and that part is done correctly. So, I’m using CPT and i have custom fields in my custom post type “nekretnina” that i’m applying search for and I’m getting the results, but i want to show custom fields from those results that im searching for in my results.
    Example.
    CPT nekretnina is searched by price,
    CPT has the custom meta field brojsobe.

    How do i call this custom field in the while loop in results.php so that i can show it in my page.

    Very Respectfully, Dan.

    #201942

    In reply to: Results Shortcode


    Trevor
    Participant

    To show them in columns (effectively a grid, would mean you would need to code the template to have HTML and CSS to make this happen.

    As you are using our shortcode method the display of the results comes from our results.php file. You would need to customise it as described (in basic form) here:

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

    You need to remove the lines::

    <p><?php the_category(); ?></p>
    <p><?php the_tags(); ?></p>
    <p><small><?php the_date(); ?></small></p>

    To remove the featured image, remove these lines:

    <?php
    if ( has_post_thumbnail() ) {
      echo '<p>';
      the_post_thumbnail("small");
      echo '</p>';
    }
    ?>
    #201905

    Trevor
    Participant

    The HTML shown there (the part that starts div id=lightgallery-1") is not from our normal results.php file. Are you able to show me the PHP/HTML that makes that part?

    #201618

    In reply to: Current menu item


    Anonymous
    Inactive

    I’ve set it up like this. Works fine. Only with the problem that it shows all posts at first load. I need it empty

    [searchandfilter id=”36613″ action=”filter_next_query”]
    [post_grid id=”40757″]

    If I understand correctly I have to put your code in a results.php
    I can’t find such php in the “post-grid” – plug-ins phps
    Also not in the Standart WordPress directory…

    #201415

    Anonymous
    Inactive

    Thanks for the advice. That’s nice didn’t know renaming result to the form ID will work and make it possible to have multiple result.php versions.

    The map is crashing the server (haha) so you were right. Now we try another code structure on the map results.php so we don’t have to generate so much at once and try to do some lazy loading. Hope we will get it to work.

Viewing 10 results - 361 through 370 (of 1,224 total)