-
AuthorSearch Results
-
April 7, 2017 at 2:21 pm #101966
In reply to: Custom fields are not working in filter
TrevorParticipantYes, but step one is to ignore Search & Filter results and make a page with the archives as yuo like to style them in Divi, and also the search form only. No need to connect the form yet to results.
April 7, 2017 at 1:10 pm #101949In reply to: X theme – masonry problem
AnonymousInactiveI found this thread: https://theme.co/apex/forums/topic/ajax-plugin-load-issues-with-themex/
Reading it makes me think they’re not very cooperative/helpful when it comes to “third party” plugins. 🙁However I found out that masonry view in X theme makes use of an older version of Isotope: http://isotope.metafizzy.co/
This is how Isotope is called in index:
<?php x_get_view( 'global', '_script', 'isotope-index' ); ?> <div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>">And it is handled by _script-isotope-index.php:
<?php // ============================================================================= // VIEWS/GLOBAL/_SCRIPT-ISOTOPE-INDEX.PHP // ----------------------------------------------------------------------------- // Isotope script call for index output. // ============================================================================= $is_rtl = is_rtl(); ?> <script> jQuery(document).ready(function($) { <?php if ( $is_rtl ) : ?> $.Isotope.prototype._positionAbs = function( x, y ) { return { right: x, top: y }; }; <?php endif; ?> var $container = $('#x-iso-container'); $container.before('<span id="x-isotope-loading"><span>'); $(window).load(function() { $container.isotope({ itemSelector : '.x-iso-container > .hentry', resizable : true, filter : '*', <?php if ( $is_rtl ) : ?> transformsEnabled : false, <?php endif; ?> containerStyle : { overflow : 'hidden', position : 'relative' } }); $('#x-isotope-loading').stop(true,true).fadeOut(300); $('#x-iso-container > .hentry').each(function(i) { $(this).delay(i * 150).animate({'opacity' : 1}, 500); }); }); $(window).smartresize(function() { $container.isotope({ }); }); }); </script>April 6, 2017 at 9:07 pm #101872In reply to: Results showing without any search
RossKeymasterWrap it in a function should work as loading the script in the footer directly has no dependency, so jquery or S&F might not even be loaded properly –
<script> (function ( $ ) { $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); //so load your lightbox or JS scripts here again document.getElementById("sfresults").style.display = "inline"; }); }(jQuery)); </script>You can actually check in your results template (no need for JS) if something has been filtered, to display alternate content, check out this reply –
https://support.searchandfilter.com/forums/topic/search-and-filter-issues/#post-97498
And docs:
Best
April 6, 2017 at 7:07 pm #101840In reply to: Results showing without any search
AnonymousInactiveHi,
Was wondering if this option to hide results by default has been enabled in the latest version. I require this functionality too.
I tried by setting the style for the results div with id “sfresults” to “display:none” in the css file and then added the below code in footer.php but it does not work. The hidden div on page load does not change its style on completion of ajax request.
*****************************
*****************************Please help.
April 1, 2017 at 7:47 pm #100877In reply to: Pagination not working
RossKeymasterHi Pierre
Ok couple of things.
1) Redownload the S&F VC (not pro) plugin above (I updated it, same name, same zip so download again and re-install)
2) Add this to functions.php of your theme:
add_filter( 'search_filter_vc_pagination', 'search_filter_vc_pagination' ); function search_filter_vc_pagination() { global $wp_query; $big = 999999999; // need an unlikely integer $translated = __( 'Page', 'mytextdomain' ); // Supply translatable string $output = 'Custom Pagination: '; $output .= paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'before_page_number' => '<span class="screen-reader-text">'.$translated.' </span>' ) ); return $output; }—-
Now when you check the pagination, I’m sure it won’t look how you want, but you will see the message “Custom Pagination”?
What I’ve done is added another way to customise pagination, by adding this code to functions.php, you can literally use any WP functions to create your pagination – basically you get full control.
The code I added above is just one example of how you can add in your own pagination, in this example I am using the WP function
paginate_links.If you do not add the above code to functions.php, then the pagination will work as it currently does (from your screenshot) and is generated by another WP pagination function
get_the_posts_pagination– both can look pretty much the same – I’m just demonstrating flexibility by using another WP function to do the job.—-
You mention customisation / integration with your theme.
Unfortunately thats out of remit of our support here – what you are looking for is how to make the WP functions
paginate_linksorget_the_posts_pagination, work and look nice with your theme.This is something you should talk to your theme devs/support about. They will likely have a snippet of code (probably already used in some other template files) that you could literally copy and paste.
If you manage to get hold of the correct code to use to integrate the WP functions with your theme and use the correct styles, but you are still stuck, I can advise on how to integrate that with our code above just let me know.
Hope that helps!
Best
March 29, 2017 at 4:57 pm #100207Topic: Filter existing query
in forum Search & Filter Pro
AnonymousInactiveHi, I’m trying to use the filter on a page which I have set-up to already display blog posts in a grid layout determined by my theme(Jupiter). I would like to filter these posts in the grid style or edit the results template to reflect this style, whichever is easiest. I noticed a similar post where it was suggested to use a short code with some added code: [searchandfilter id=’123′ action=’filter_next_query’] but this causes the filter to disappear completely.
Thanks.March 27, 2017 at 9:23 am #99600In reply to: Apply the filter to an existing portfolio page
TrevorParticipantDid the page builder come with the theme (is the theme ‘Mega’?), or is it a separate plugin from a third party author? Mega seems to have its own page builder included.
Do you place content on the page using widgets, and in those can you place shortcodes?
Are you able to place a widget with a shortcode directly above the portfolio grid, and if so, can you try this shortcode?
[searchandfilter id="1459" action="filter_next_query"]Your grid might be using the
masonryscript as well, so it may be necessary to re-trigger the masonry script as well, using code like this:<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); \\ your script to re-trigger masonry }); }(jQuery)); </script>However, you would the help of your theme author to provide the code for that one line. It varies from theme to theme.
However, in your case I think
reloaditemsis the way to go, as shown on this page:http://masonry.desandro.com/methods.html#reloaditems
So the line of script would be this:
$grid.masonry('reloadItems');But, you need to define
$grid, like this maybe:jQuery('portfolio-container-style-1').masonry('reloadItems');So you script might be (and I say MIGHT):
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); jQuery('portfolio-container-style-1').masonry('reloadItems'); }); }(jQuery)); </script>However, it is also possible it uses the Isotope relayout function:
http://isotope.metafizzy.co/v1/demos/relayout.html
Like this:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); jQuery('portfolio-container-style-1').isotope('relayout'); }); }(jQuery)); </script>March 15, 2017 at 9:28 pm #97180In reply to: Uncode VC results
AnonymousInactiveHi Trevor,
Yes it came with the theme. However, in this thread it seemed to work for a person with the same theme as me. Do you know how it was fixed?
https://support.searchandfilter.com/forums/topic/style-results-to-fit-theme-vc/
Thanks!
Susana
March 14, 2017 at 6:19 pm #96820Topic: Uncode VC results
in forum Search & Filter Pro
AnonymousInactiveHi,
I’m using the theme Uncode. I have been trying to use the extension for VC so my results display with masonry / isotope. However, I cant find how to insert the data source. I found this thread:
https://support.searchandfilter.com/forums/topic/style-results-to-fit-theme-vc/
But cant see what the solution was since it was marked private. Please advice.
Thanks!
Susana
March 14, 2017 at 4:42 pm #96754In reply to: Filter Results Not Correct
AnonymousInactiveNo, that’s a fair question. I was frankly not entirely sure if it was the right solution to my issues, but left it installed for the time being in case I needed it later.
The reason I wasn’t sure is because it seemed specific to ‘Post Grid’, whereas in VC we’re using the ‘Blog’ component that has the specific thumbnail layout we want, but also might only be part of Artbees modified VC that they use for their themes (I’m not familiar with stock VC so don’t know what’s normally included).
At this point, it might make more sense for me to just use ‘Post Grid’ and try to style it in such a way that it’s similar to the thumbnail.php layout from the ‘Blog’ component.
I did notice in your test page, and the one I re-created, that when you select one of the filters it zeros out the other two options. So in the test page it shows 5 Stars (1) 3 Stars (1) 1 Star (1), but when you select one of the filters the other two have (0) for some reason, thus resulting in an inability to have more than one option selected. I assume this isn’t expected behavior?
-
AuthorSearch Results
Search Results for 'filter style'
-
Search Results
-
Topic: Filter existing query
Hi, I’m trying to use the filter on a page which I have set-up to already display blog posts in a grid layout determined by my theme(Jupiter). I would like to filter these posts in the grid style or edit the results template to reflect this style, whichever is easiest. I noticed a similar post where it was suggested to use a short code with some added code: [searchandfilter id=’123′ action=’filter_next_query’] but this causes the filter to disappear completely.
Thanks.Topic: Uncode VC results
Hi,
I’m using the theme Uncode. I have been trying to use the extension for VC so my results display with masonry / isotope. However, I cant find how to insert the data source. I found this thread:
https://support.searchandfilter.com/forums/topic/style-results-to-fit-theme-vc/
But cant see what the solution was since it was marked private. Please advice.
Thanks!
Susana