ul71m0
Forum Replies Created
-
Hi @priyagoenka
I opened 2 tickets but nobody is answering there, its not really great support service.
Forum: Plugins
In reply to: [Ultimate WP Query Search Filter] Different Ajax tempalte for different formTo answer myself here, maybe someone will need it, you can see the part with ” if ($id == ‘132’) {…”
add_filter('uwpqsf_result_tempt', 'customize_output', '', 4); function customize_output($results, $arg, $id, $getdata) { $apiclass = new uwpqsfprocess(); $query = new WP_Query($arg); $i = 0; ob_start(); $result = ''; if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); global $post; $i++; if ($id == '132') { ?> <div class="col-md-3 col-sm-4 col-xs-6 small-xs"> <div class="product-image"> <?php the_post_thumbnail(); ?> <span> <a href="<?php the_permalink(); ?>">View</a> </span> </div> <p class="product-name"><?php the_title() ?></p> </div> <?php } if ($id == '234') { ?> //result from form id 234 <?php } ?> <?php if ($i % 4 === 0) { echo '</div><div class="row">'; } ?> <?php } echo $apiclass->ajax_pagination($arg['paged'], $query->max_num_pages, 4, $id, $getdata); } else { echo 'No products found'; } wp_reset_postdata(); $results = ob_get_clean(); return $results; }
Forum: Plugins
In reply to: [WordPress Popular Posts] Multiple calls, shows only firlstOk i found the problem, i did elimination of parameter by parameter and i found that i didnt had closing “. For example i have range=”daily so i was missing one ” in every line.
Forum: Plugins
In reply to: [WordPress PDF Templates] Template not changingThank you. That worked.
Forum: Plugins
In reply to: Template not changingWrong posting, i didnt added corresponding plugin.
Got it working with this, so im sharing solution if someone else get stuck with this:
$(".ajax-load-more-wrap").on("click",".toggle",function() { $(this).prev(".toggle-content").slideToggle(); $(this).closest(".success").toggleClass("highlight"); $(this).toggleClass("open"); }) $(".ajax-load-more-wrap").on("click",".heading-toggle",function() { $(this).siblings(".toggle-content").slideToggle(); $(this).closest(".success").toggleClass("highlight"); $(this).siblings('.btn').toggleClass("open"); }) $(".ajax-load-more-wrap").on("click",".img-toggle",function() { $(this).next('.col-sm-6').children(".toggle-content").slideToggle(); $(this).closest(".success").toggleClass("highlight"); $(this).next('.col-sm-6').children('.btn').toggleClass("open"); })
Needed to target existing div, not one that was loaded with AJAX.
So on every new ajax load it adds one more iteration of toggle for example…
Oh but i have other problem now, because im using 3 shortcodes on page ( 3 tabs ) when i click on one button it does action 2 times, and that is only on first 2 tabs, on third tab everything works normal.
It was working fine when i had only 1 shortcode.
So when i click button element opens and instantly closes straight away…
Thanks for help, i resolved topic!
Your sample isn`t working, this one i pasted with complete functions does the trick, im happy with it.
Hey after posting here i did more research and found solution:
$.fn.almComplete = function(alm){ $( ".toggle" ).click(function() { $(this).prev( ".toggle-content" ).slideToggle(); $(this).closest( ".success" ).toggleClass( "highlight" ); $(this).toggleClass( "open" ); }); $( ".heading-toggle" ).click(function() { $(this).siblings( ".toggle-content" ).slideToggle(); $(this).closest( ".success" ).toggleClass( "highlight" ); $(this).siblings('.btn').toggleClass( "open" ); }); $( ".img-toggle" ).click(function() { $(this).next('.col-sm-6').children( ".toggle-content" ).slideToggle(); $(this).closest( ".success" ).toggleClass( "highlight" ); $(this).next('.col-sm-6').children('.btn').toggleClass( "open" ); }); }
Is this correct way?
And thanks for fast response.
Forum: Fixing WordPress
In reply to: Print something if value exist in metabox multicheckResloved.
Forum: Fixing WordPress
In reply to: Print something if value exist in metabox multicheckTo answer myself in case someone will need it. I used php in_array() function to check if vaule is in array and than i printed my image.
<?php global $post; $key = '_cmb_product_features'; $themeta1 = get_post_meta($post->ID, $key, false); if (in_array("check1", $themeta1)) { ?> <img src="<?php bloginfo('template_url'); ?>/assets/images/content/range-type1.png" alt="type1"> <?php } else { ?> <?php } ?> <?php global $post; $key = '_cmb_product_features'; $themeta2 = get_post_meta($post->ID, $key, false); if (in_array("check2", $themeta2)) { ?> <img src="<?php bloginfo('template_url'); ?>/assets/images/content/range-type2.png" alt="type2"> <?php } else { ?> <?php } ?>
Forum: Fixing WordPress
In reply to: Spread posts from same query evenly in 3 divs/columnsThanks for your effort.
Well if i set posts_per_row to 3 and i have 26 posts im getting 12 divs ( posts_row) with 3 posts each…
My posts_per_page are set to 50 but i dont want to have this limit, i want posts to be spread evenly in all columns wihtout seting posts_per_page.
Forum: Fixing WordPress
In reply to: Spread posts from same query evenly in 3 divs/columnsThat doesnt help as post_per_row are hardcoded and i need it to be dynamic.