Forums › Forums › Search & Filter Pro › DIVI Ajax on filter spits out DIVI shortcode
Tagged: ajax, Divi, search and filter pro
- This topic has 6 replies, 2 voices, and was last updated 5 years, 4 months ago by Anonymous.
-
Anonymous(Private) July 11, 2019 at 10:33 pm #216124
So I have Search and Filter Pro set up to use shortcodes and everything seems to look ok on initial page load but when you make a new selection of tag / category filters it loads the selected items with a large string of DIVI shortcode inside of it:
[et_pb_section bb_built=”1″ next_background_color=”#ffffff” _builder_version=”3.24″ use_background_color_gradient=”on” background_color_gradient_start=”#004363″ background_color_gradient_end=”#001d39″ background_color_gradient_direction=”90deg” background_color_gradient_end_position=”85%” box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” z_index_tablet=”500″][et_pb_row _builder_version=”3.24″ box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” z_index_tablet=”500″][et_pb_column type=”4_4″][et_pb_post_title _builder_version=”3.24″ meta=”off” featured_image=”off” text_color=”light” text_orientation=”center” text_shadow_horizontal_length=”text_shadow_style,%91object Object%93″ text_shadow_horizontal_length_tablet=”0px” text_shadow_vertical_length=”text_shadow_style,%91object Object%93″ text_shadow_vertical_length_tablet=”0px” text_shadow_blur_strength=”text_shadow_style,%91object Object%93″ text_shadow_blur_strength_tablet=”1px” title_text_align=”center” title_text_shadow_horizontal_length=”title_text_shadow_style,%91object Object%93″ title_text_shadow_horizontal_length_tablet=”0px” title_text_shadow_vertical_length=”title_text_shadow_style,%91object Object%93″ title_text_shadow_vertical_length_tablet=”0px” title_text_shadow_blur_strength=”title_text_shadow_style,%91object Object%93″ title_text_shadow_blur_strength_tablet=”1px” meta_text_shadow_horizontal_length=”meta_text_shadow_style,%91object Object%93″ meta_text_shadow_horizontal_length_tablet=”0px” meta_text_shadow_vertical_length=”meta_text_shadow_style,%91object Object%93″ meta_text_shadow_vertical_length_tablet=”0px” meta_text_shadow_blur_strength=”meta_text_shadow_style,%91object Object%93″ meta_text_shadow_blur_strength_tablet=”1px” box_shadow_horizontal_tablet=”0px” […]
When you refresh the page the filter is still selected and will remove the shortcode from inside of the displayed posts. I feel as though I may have set this up wrong, or there is a conflict somewhere.
Please feel free to message me to see the page in question, I will post on request.
Trevor(Private) July 12, 2019 at 6:33 am #216135It may be that you need to use our Divi integration instead?
https://support.searchandfilter.com/forums/topic/divi-and-sf/#post-127431
This post might clarify things:
https://support.searchandfilter.com/forums/topic/divi/#post-216089
Anonymous(Private) July 12, 2019 at 2:47 pm #216200Hello!
I have actually found and tried all of these solutions presented on these blog posts and unfortunately I still have the problem occurring. I have tried the basic idea [searchandfilter id=”4933″]<br>[searchandfilter id=”4933″ show=”results”] using two separate code blocks with no luck. I have tried
[searchandfilter id=”4933″]
[searchandfilter id=”4933″ action=”filter_next_query”]
<script>(function ( $ ) {
“use strict”;
$(document).on(“sf:ajaxfinish”, “.searchandfilter”, function(){
console.log(“ajax complete”);
var grids = document.getElementsByClassName(‘et_pb_salvattore_content’);
salvattore[‘register_grid’](grids[0]);
salvattore[‘recreate_columns’](grids[0]);
});}(jQuery));</script>
With no luck as well. The problem really isn’t with it not working, the plugin works but when you select a filter it DUMPS DIVI shortcode onto the page until you reload. That’s really the core problem, I really want to be able to use the AJAX with this plugin as it makes it very smooth and easy to use.
If you would like to see the problem for yourself please take a look at this page here:
http://unwritten-fall.flywheelsites.com/assessments/index/
As discussed in the above statement, choose a filter by and let the AJAX kick in so you can see the code get spat out.
Trevor(Private) July 12, 2019 at 4:58 pm #216218I have seen this before, and the only solution was to either change the code in the results.php file to call the_content and not the_excerpt, or to create a custom excerpt for each post.
If you edit the results.php file, make sure you follow this guidance:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
Anonymous(Private) July 12, 2019 at 7:04 pm #216234Ok I have tried that and now its spits out even more code:
[et_pb_section bb_built=”1″ next_background_color=”#ffffff” _builder_version=”3.24″ use_background_color_gradient=”on” background_color_gradient_start=”#004363″ background_color_gradient_end=”#001d39″ background_color_gradient_direction=”90deg” background_color_gradient_end_position=”85%” box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” z_index_tablet=”500″][et_pb_row _builder_version=”3.24″ box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” z_index_tablet=”500″][et_pb_column type=”4_4″][et_pb_post_title _builder_version=”3.24″ meta=”off” featured_image=”off” text_color=”light” text_orientation=”center” text_shadow_horizontal_length=”text_shadow_style,%91object Object%93″ text_shadow_horizontal_length_tablet=”0px” text_shadow_vertical_length=”text_shadow_style,%91object Object%93″ text_shadow_vertical_length_tablet=”0px” text_shadow_blur_strength=”text_shadow_style,%91object Object%93″ text_shadow_blur_strength_tablet=”1px” title_text_align=”center” title_text_shadow_horizontal_length=”title_text_shadow_style,%91object Object%93″ title_text_shadow_horizontal_length_tablet=”0px” title_text_shadow_vertical_length=”title_text_shadow_style,%91object Object%93″ title_text_shadow_vertical_length_tablet=”0px” title_text_shadow_blur_strength=”title_text_shadow_style,%91object Object%93″ title_text_shadow_blur_strength_tablet=”1px” meta_text_shadow_horizontal_length=”meta_text_shadow_style,%91object Object%93″ meta_text_shadow_horizontal_length_tablet=”0px” meta_text_shadow_vertical_length=”meta_text_shadow_style,%91object Object%93″ meta_text_shadow_vertical_length_tablet=”0px” meta_text_shadow_blur_strength=”meta_text_shadow_style,%91object Object%93″ meta_text_shadow_blur_strength_tablet=”1px” box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” z_index_tablet=”500″ background_color=”rgba(255,255,255,0)” locked=”on” /][et_pb_text admin_label=”Pathway Assessment Blueprint – H5″ _builder_version=”3.24″ text_text_align=”center” text_text_color=”#ffffff” text_text_shadow_horizontal_length=”text_text_shadow_style,%91object Object%93″ text_text_shadow_horizontal_length_tablet=”0px” text_text_shadow_vertical_length=”text_text_shadow_style,%91object Object%93″ text_text_shadow_vertical_length_tablet=”0px” text_text_shadow_blur_strength=”text_text_shadow_style,%91object Object%93″ text_text_shadow_blur_strength_tablet=”1px” text_orientation=”center” link_text_shadow_horizontal_length=”link_text_shadow_style,%91object Object%93″ link_text_shadow_horizontal_length_tablet=”0px” link_text_shadow_vertical_length=”link_text_shadow_style,%91object Object%93″ link_text_shadow_vertical_length_tablet=”0px” link_text_shadow_blur_strength=”link_text_shadow_style,%91object Object%93″ link_text_shadow_blur_strength_tablet=”1px” ul_text_shadow_horizontal_length=”ul_text_shadow_style,%91object Object%93″ ul_text_shadow_horizontal_length_tablet=”0px” ul_text_shadow_vertical_length=”ul_text_shadow_style,%91object Object%93″ ul_text_shadow_vertical_length_tablet=”0px” ul_text_shadow_blur_strength=”ul_text_shadow_style,%91object Object%93″ ul_text_shadow_blur_strength_tablet=”1px” ol_text_shadow_horizontal_length=”ol_text_shadow_style,%91object Object%93″ ol_text_shadow_horizontal_length_tablet=”0px” ol_text_shadow_vertical_length=”ol_text_shadow_style,%91object Object%93″ ol_text_shadow_vertical_length_tablet=”0px” ol_text_shadow_blur_strength=”ol_text_shadow_style,%91object Object%93″ ol_text_shadow_blur_strength_tablet=”1px” quote_text_shadow_horizontal_length=”quote_text_shadow_style,%91object Object%93″ quote_text_shadow_horizontal_length_tablet=”0px” quote_text_shadow_vertical_length=”quote_text_shadow_style,%91object Object%93″ quote_text_shadow_vertical_length_tablet=”0px” quote_text_shadow_blur_strength=”quote_text_shadow_style,%91object Object%93″ quote_text_shadow_blur_strength_tablet=”1px” header_text_shadow_horizontal_length=”header_text_shadow_style,%91object Object%93″ header_text_shadow_horizontal_length_tablet=”0px” header_text_shadow_vertical_length=”header_text_shadow_style,%91object Object%93″ header_text_shadow_vertical_length_tablet=”0px” header_text_shadow_blur_strength=”header_text_shadow_style,%91object Object%93″ header_text_shadow_blur_strength_tablet=”1px” header_2_text_shadow_horizontal_length=”header_2_text_shadow_style,%91object Object%93″ header_2_text_shadow_horizontal_length_tablet=”0px” header_2_text_shadow_vertical_length=”header_2_text_shadow_style,%91object Object%93″ header_2_text_shadow_vertical_length_tablet=”0px” header_2_text_shadow_blur_strength=”header_2_text_shadow_style,%91object Object%93″ header_2_text_shadow_blur_strength_tablet=”1px” header_3_text_shadow_horizontal_length=”header_3_text_shadow_style,%91object Object%93″ header_3_text_shadow_horizontal_length_tablet=”0px” header_3_text_shadow_vertical_length=”header_3_text_shadow_style,%91object Object%93″ header_3_text_shadow_vertical_length_tablet=”0px” header_3_text_shadow_blur_strength=”header_3_text_shadow_style,%91object Object%93″ header_3_text_shadow_blur_strength_tablet=”1px” header_4_text_shadow_horizontal_length=”header_4_text_shadow_style,%91object Object%93″ header_4_text_shadow_horizontal_length_tablet=”0px” header_4_text_shadow_vertical_length=”header_4_text_shadow_style,%91object Object%93″ header_4_text_shadow_vertical_length_tablet=”0px” header_4_text_shadow_blur_strength=”header_4_text_shadow_style,%91object Object%93″ header_4_text_shadow_blur_strength_tablet=”1px” header_5_text_align=”center” header_5_text_shadow_horizontal_length=”header_5_text_shadow_style,%91object Object%93″ header_5_text_shadow_horizontal_length_tablet=”0px” header_5_text_shadow_vertical_length=”header_5_text_shadow_style,%91object Object%93″ header_5_text_shadow_vertical_length_tablet=”0px” header_5_text_shadow_blur_strength=”header_5_text_shadow_style,%91object Object%93″ header_5_text_shadow_blur_strength_tablet=”1px” header_6_text_shadow_horizontal_length=”header_6_text_shadow_style,%91object Object%93″ header_6_text_shadow_horizontal_length_tablet=”0px” header_6_text_shadow_vertical_length=”header_6_text_shadow_style,%91object Object%93″ header_6_text_shadow_vertical_length_tablet=”0px” header_6_text_shadow_blur_strength=”header_6_text_shadow_style,%91object Object%93″ header_6_text_shadow_blur_strength_tablet=”1px” custom_margin=”-1em|||” custom_padding=”0px|||” box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” z_index_tablet=”500″ background_layout=”dark” header_5_text_color=”#ffffff” locked=”on”]
When it doesn’t spit out code it instead displays the actual content of the page as a whole. The goal of the filter for these pages are to just display the title, the tag, the category and that’s it. Thoughts?
-
AuthorPosts