Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 631 through 640 (of 1,224 total)
  • Author
    Search Results
  • #135159

    Anonymous
    Inactive

    Hello,

    We’ve used this plugin on a few sites and it has worked great! So thanks for the awesome plugin.

    On both of those sites we’ve done the pagination with the WP-PageNavi plugin which is suggested in the default results.php template you provide. My question is, how can I use Search And Filter with native WP pagination?

    Right now I have a site that uses the Search And Filter and uses AJAX refresh. When I click the numbers in the pagination, the results refresh properly, but the pagination styles don’t change to reflect that. The current page number doesn’t change, and the previous page link does not show up. Additionally, clicking the next page link works the first time, but the second time it’s clicked it goes back to the original results (page 1).

    Here’s the code I’m using for the pagination inside the results.php file (theme/search-filer/results.php):

    <?php // Pagination
    	$total = $query->max_num_pages;
    	// only bother with pagination if we have more than 1 page
    	if ( $total > 1 ) : ?>
    		<nav class="pagination text-center">
    			<?php
    			// Set up pagination to use later on
    			$big = 999999999; // need an unlikely integer
    			$pagination = paginate_links( array(
    				'base'      => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    				'format'    => '?paged=%#%',
    				'current'   => max( 1, get_query_var('sf_paged') ),
    				'total'     => $total,
    				'type'      => 'plain',
    				'prev_next' => true,
    				'prev_text' => __('', 'visceral'),
    				'next_text' => __('', 'visceral')
    			) );
    
    			echo $pagination; ?>
    		</nav>
    	<?php endif; ?>

    Any directions for getting this to work without WP-PageNavi?

    Thanks!
    Travis

    #135013

    Anonymous
    Inactive

    Those posts help, thank you. Another related question — how do I get the current checked filters via PHP to use in my child theme’s results.php page.

    #134943

    Anonymous
    Inactive

    Hi, I’m trying to accomplish result where i have two search fields. In the first one i’m going to use for free search and the another is used just for location search. At the moment when i fill the fields and press search the request is recognizing only one of the search fields and fills the other with same text.

    I’m displaying results with shortcode and i have created custom results.php in my child-theme. I have Ajax on.

    So my question is it possible to get the both search field values into the request?

    #134925

    In reply to: Query issues


    Trevor
    Participant

    Are you using the Shortcode Display Results Method? And is, so, are you using the standard results.php template?

    #134506

    Trevor
    Participant

    Then However, instead of copying the results.php file, use the results-infinite-scroll.php file and then rename it to results.php

    You can edit that file as you need (or remove bits).

    #134494

    Trevor
    Participant

    You need to follow the customisation guide here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    and then edit the results.php file (or are you using infinite scroll?) to add the code to the template, at the top.

    #134475

    In reply to: Post container classes


    Trevor
    Participant

    If you are using our Shortcode Display results method, then follow the customising guide here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    However, instead of copying the results.php file, use the results-infinite-scroll.php file and then rename it to results.php

    You can edit that file as you need (or remove bits).

    #133949

    In reply to: Error on settings page


    Trevor
    Participant

    It looks like your search form results page is using your standard archives.php template file. Thus it is your theme that is doing this.

    The following suggestion assumes that you are using a child theme, and not a master theme (Orbisius do a free child theme maker plugin to make this easy if you are not using a child theme):

    It may be possible to copy this template file into the child theme folder and rename it (e.g. search-results.php) and set the form to use that. If the page still has the wrong title, you may need to edit the template file. You might be able to hard code the title.

    #133776

    Trevor
    Participant

    OK, it is working now, but the Visual Composer shortcodes are not being executed. Can you follow the customization guide here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    Then edit the new results.php file and find this line:

    <p><br /><?php the_excerpt(); ?></p>
    

    It may need to lokk like this instead:

    <p><br /><?php do_shortcode(the_excerpt()); ?></p>
    

    I cannot be sure if that would fix that.

    #133764

    In reply to: Styling of results


    Trevor
    Participant

    From what I can see, your form is set up to use the Display Results method, and in the right sidebar you have the form. You have the ‘cards’ content at the top of the main content block, and under that you have placed the form’s results shortcode.

    The cards will be output by either a plugin or your theme, probably using a template PHP file, and the form results in this case will be using our (basic) exemplar results.php template file, as described here:

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

    What you want, if possible, is to link the form to the cards section, and not use our shortcode. That would probably require you to use the As an Archive Display Results method, or the Custom method. In the first instance, did you try the As an Archive, and if you did, what happened (not using the shortcode for results therefore)?

Viewing 10 results - 631 through 640 (of 1,224 total)