Search Results for 'filter style'

Forums › Forums › Search › Search Results for 'filter style'

Viewing 10 results – 241 through 250 (of 588 total)
  • Author
    Search Results
  • #202814

    Anonymous
    Inactive

    My Site:
    http://dev2.themeridiangroup.com/newravenna.com/inspiration/

    Right now, I have 17 posts for testing purposes, all with unique images. It’s showing 17 results but some are duplicates. Nothing I’ve tried seems to fix it. By the way, this page is showing a shortcode instead of a slider.

    I have the Infinite Scroll Container set as .search-filter-results-list.

    My code:

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      https://searchandfilter.com
     * @copyright 2018 Search & Filter
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	
    	<div class='search-filter-results-list'>
    
    	<?php while ($query->have_posts()) {$query->the_post(); ?>
    
    		<?php if ( has_post_thumbnail() ) : ?>
    			<?php $caption = get_the_post_thumbnail_caption(); ?>
    			<a class="inspiration-result-link" href="<?php the_post_thumbnail_url("full"); ?>" data-lightbox="inpspiration" data-title="<?php echo $caption; ?>">
    				<div class='search-filter-result-item'>
    					<?php the_post_thumbnail("large"); ?>
    				</div>
    			</a>
    
    		<?php endif; ?>
    
    	<?php }	?>
    	</div>
    <?php
    }
    else
    {
    	?>
    	<div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end' style="display: block;">
    		<span>End of Results</span>
    	</div>
    	<?php
    }
    ?>
    #202490

    Anonymous
    Inactive

    Hi Search Filter Team,

    I have read several posts related to this topic and used following code to make search form in horizontal style but it is not working, I added this code in custom css of my theme:

    .searchandfilter > ul > li {
    display: inline-block;
    margin-right: 20px;
    float: left;
    }
    .searchandfilter > ul > li:last-child {
    margin-right: 0;
    }
    .search-filter-results {clear: both;}

    I am using Nirvana child theme and wp bakery page builder.

    Kindly help me in this matter.

    Chetan


    Anonymous
    Inactive

    Hi Trevor, I asked before about using two different forms, and in the case I described of having one form with less on the home page and a full form elsewhere you suggested I use styles to remove fields in the form, which is fine so I’ll check that out, thank you.

    Something else I’m stuck on with this in mind which I thought you might have come across before, is that I’d like to have one (wordpress) page showing results of my form in the woo shop format with tickets of a certain category only, and another page showing tickets of a different category. How would I go about achieving that with s and f pro?

    Thank you

    Following on from this topic here:
    https://support.searchandfilter.com/forums/topic/error-two-forms-using-woocommerce-shop/

    #202010

    Trevor
    Participant

    Ah. THAT is set by the browser. And the code to ‘fix’ it varies according to browser and browser version.

    It is better to use the Select2 V4 script and then style that. This post explains how:

    https://support.searchandfilter.com/forums/topic/how-can-i-customize-the-form-with-css/#post-199584

    #201986

    Anonymous
    Inactive

    Haaa … that was it!

    I used this code to declutter the site:

    // unregister some overload
    add_action( 'wp_enqueue_scripts', 'wOw_unregister_something' );
    function wOw_unregister_something() {
    	// search & filter plugin
    	wp_deregister_script( 'jquery-ui-datepicker' );
    	wp_deregister_script( 'search-filter-plugin-build' );
    	wp_deregister_script( 'hoverIntent' );
    }
    	
    // more from search & filter plugin
    add_action('wp_print_styles', 'remove_sf_styles', 100);
    function remove_sf_styles(){
    	wp_dequeue_style( 'search-filter-plugin-styles' );
    }
    

    For some reason I thought that the js is in general not needed if Ajax is not activated.
    Good to know it always needs to be in there, so what I did not is to comment out this line:
    wp_deregister_script( ‘search-filter-plugin-build’ );

    Now it works again!
    Awesome!

    #201720

    Trevor
    Participant

    The form has basic styling, for you to style with custom CSS yourself. Our documentation has the basic code to make it horizontal:

    https://searchandfilter.com/documentation/getting-started/display-search-form/


    Anonymous
    Inactive

    Hi I have an issue with Search and Filter where if I try to have two Taxonomy filters it causes a glitch where I have to click the checkbox twice to get it to change the results.

    The reason for having two filters for the same Taxonomy is one is a dropdown and the other is a checkbox. I want to hide the checkbox on mobile and display the dropdown for mobile devices as the checkboxes cause too much clutter. However with this glitch it makes this approach impossible.

    Is there an alternative to having an alternate search style on mobile.

    Thanks,
    Janek

    #201141

    Trevor
    Participant

    OK. So, for now, this will need to be an manual setup.

    You will need this JavaScript file:

    https://www.dropbox.com/s/vuu640lyjga094e/select2multi-checkboxes.js?dl=0

    I loaded this file in my theme with this code in my child theme functions.php file (I placed the file in a sub-folder of my child theme called js:

    function sandf_checkbox_script() {
      wp_register_script( 'select2-with-checkboxes', get_stylesheet_directory_uri() . '/js/select2multi-checkboxes.js', array('jquery'), '1.0.0', true );
      wp_enqueue_script( 'select2-with-checkboxes' );
    }
    add_action( 'wp_enqueue_scripts', 'sandf_checkbox_script', 99 );

    Lines 81 and 89 will need to be edited. Here is what they look like (the lines with sf-field-taxonomy-download_category in):

    jQuery(function($) {
      $('.sf-field-taxonomy-download_category .sf-input-select').select2MultiCheckboxes({
        templateSelection: function(selected, total) {
          return selected.length + " selected of " + total;
        }
      })
    });
    (function ( $ ) {
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        $('.sf-field-taxonomy-download_category .sf-input-select').select2MultiCheckboxes({
          templateSelection: function(selected, total) {
            return selected.length + " selected of " + total;
          }
        });
      });
    }(jQuery));

    You need to change these names to whatever your field is called.

    You will need some Custom CSS (you may need to make it more specific to the field, but this should work as is):

    .select2-results__option .wrap:before{
        font-family: 'Font Awesome\ 5 Free';
        color:#999;
        content:"\f0c8";
        width:25px;
        height:25px;
        padding-right: 10px;
    }
    .select2-results__option[aria-selected=true] .wrap:before{
        content:"\f14a";
    }

    You will need an icon font. I have used Font Awesome 5 Free. You may already have one loading to your site. The content numbers and font-family name in the code will need to match whichever icon font and icons you use.

    I loaded Font Awesome 5 Free with this code in my child theme functions.php file:

    function sandf_add_custom_fa_css() {
      wp_enqueue_style( 'custom-fa', 'https://use.fontawesome.com/releases/v5.6.3/css/all.css' );
    }
    add_action( 'wp_enqueue_scripts', 'sandf_add_custom_fa_css' );

    In the form field settings, the field needs to be set to multi-select AND combobox, and in the plugin settings, the Combobox script needs to be set to Select2.


    Anonymous
    Inactive

    Trevor,

    It’s working! It doesn’t use his grid anymore—it just goes to an archive page for the results, but I much prefer the way it’s working now and can style that on my own. And I can filter by tag again—yay!

    Thank you so much for going through that for me. I can’t thank you enough for taking the time when it wasn’t even your plugin causing the issue. Very much appreciated!

    Kari

    #199980

    Anonymous
    Inactive

    Not sure if I follow you. I did a test by creating a styled button and linking to the current page:

    <a>">Reset</a>

    The thing is that the permalink gets updated by the ajax filter and it basically has the same weird behaviour as the reset link from the filters.

Viewing 10 results – 241 through 250 (of 588 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.