Search Results for 'get_field'

Forums › Forums › Search › Search Results for 'get_field'

Viewing 10 results – 41 through 50 (of 219 total)
  • Author
    Search Results
  • #230834

    Anonymous
    Inactive

    “I can see what you are doing. You have on the page two archives which are S&F form Results shortcodes. The forms themselves are being used only to pre-filter, with no actual form.”

    > Correct

    You are using custom results.php files (numbered the same as the forms). If using the standard results.php template for both results, there is not an issue?

    > It works with the default listing.

    If form #780 uses the standard results.php, but form #781 uses the custom one, it works?

    > It does.

    If form #780 uses the custom results.php and form #781 uses the standard results.php, what happens then?

    > It does NOT work.

    I’m using the default loop “while ($query->have_posts())” and then using filters to remove some of the results with get_field. That’s why I’m not using any limist to the results (they list from 105 to 300 results).

    If both results are using a custom result.php, the second (781) is not even going into the “if ($query->have_posts())” loop.

    #230647

    Anonymous
    Inactive

    This is my code, using a shortcode and a query. The display results option is Custom and using ajax.

    <?php echo do_shortcode ('[searchandfilter id="5437"]'); ?>
    
    <div class="clearfix"></div>
    <div class="filtro-cars" data-wow-duration="1s" data-wow-delay="0.3s">
    
    	<?php $args = array('post_type' => 'renting');
    	$args['search_filter_id'] = 5437;
    	$query = new WP_Query($args);?>
    
    	<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); // run the loop ?>
    	<div class="car main-car col-xs-12 col-sm-12 col-md-6 wow fadeIn no-padding" data-wow-duration="0.4s" data-wow-delay="0.3s">
    		<a class="redirectClick" href="<?php the_permalink(); ?>">
    			<div class="item item-price" >
    				<div class="car-shadow">
    					<div class="image"><?php the_post_thumbnail( 'car-related' ); ?></div>
    				    <div class="data">
    					    <div class="row">
    						    <div class="col-md-7 col-lg-8">
    						    	<span class="marca"><?php the_title (''); ?></span>
    						    	<span class="vehicle-finish"><?php the_field ('modelo'); ?></span>
    						    </div>
    						    <div class="col-md-5 col-lg-4">
    							    <div class="combustible hidden-xs hidden-sm">
    					    			<?php
    									$count = 0;
    									$your_repeater = get_field('caracteristicas');
    									if($your_repeater){
    									while( have_rows('caracteristicas') ): the_row();
    									$count++;
    									$my_field = get_sub_field('icono');
    									$my_content= get_sub_field('texto');
    									if ($count == 4) { ?>
    										<img width="14" src="<?php echo get_template_directory_uri(); ?>/inc/img/front/<?php echo $my_field; ?>.svg" /> <?php echo $my_content; ?>
    									<?php }
    									endwhile;  
    									}
    									?>
    							    </div>
    						    </div>
    					    </div>
    					    <div class="row">
    						    <div class="col-sm-7">
    							    <div class="precio-card"><?php the_field ('precio'); ?>€/mes<br>
    							    	<span class="iva-incluidos">IVA incluido</span>
    							    </div>
    						    </div>
    						    <div class="col-sm-5 info">
    							    <div class="kilometros">
    								    <?php the_field ('km_anuales'); ?><span class="km-anuales">km anuales |</span>
    								</div>
    							    <div class="meses">
    								    <?php the_field ('meses'); ?><span class="meses">meses</span>
    								</div>
    						    </div>
    					    </div>
    				    </div>
    				</div>
    			</div>
    		</a>
    	</div>
    	<?php endwhile;
    	else: ?>
    	<div class="no-results">No hemos encontrado resultados, prueba con otros criterios de filtro.</div>
    	<?php endif; ?>
     
    	<?php wp_reset_query(); ?>
    
    </div>

    Anonymous
    Inactive

    The plugin doesn’t use get_post_meta function, it retrieves data by using the ACF API (actions and filters) and ACF get_field(). There is no data saved in the wp_postmeta table.
    That’s why I was thinking of intercepting the WP_Query somehow…


    Anonymous
    Inactive

    Hello,

    I am using ACF Custom Database Tables plugin that creates custom tables for ACF custom meta data. ACF Custom Database Tables uses ACF’s core API functions – get_field() and update_field() – to store/retrieve data from custom tables.

    The fields for the Custom Post Type are created as usual with ACF, but then the plugin saves the data in a custom table, outside the normal WP post meta table.

    I was wondering if I can use the SF Pro plugin for searching and filtering this custom table, maybe by altering the WP_Query?
    The custom fields do not appear in the Post Meta table at all, and also not in the SF post meta search field.

    Regards!

    #230042

    Anonymous
    Inactive

    Hi Trevor, thanks for your quick thought.
    Yes,both settings for auto count are set to on.
    Hide empty is only for “choise” fields, and the first two settings are number fields. Hide empty is set to on for the third field.

    – Can it have something to do with the fact that I use 3 wp-queries?
    – I don’t see any effect from adding 'search_filter_id' => 153395, to the $args. How can I check if this is set right?

    Please see this page, where the only offer should disappear when the first filter is set to less than 3: https://fietspitstop.nl/product/yepp-fietszitje-achter-maxi-easyfit-achter-zwart/

    This is the most recent template code:

    <?php
    /*
     * Template Name: Product
     * Template Post Type: post, page, product, item
    */
    
    get_header(); ?>
    
    <?php
    $link = get_post_custom_values("link") [0];
    
    $color = get_post_custom_values("kleur") [0];
    //echo get_post_custom_values("product_group")[0];
    
    ?>
    
    <div id="content" class="site-content">
    	<section id="primary" class="content-area">
    		<main id="main" class="site-main">
    			<article id="post-2" class="post-2 page type-page status-publish hentry entry">
    			<div class = "pdp-full-top">
    			    <div class = "pdp-top-container entry-header">
    				<h1 class = "pdp-title">
    					<?php
    $brand = get_post_custom_values("brand") [0];
    $line = get_post_custom_values("line") [0];
    $type = get_post_custom_values("type") [0];
    $variant = get_post_custom_values("variant_value") [0];
    echo $brand . " " . $line . " " . $type . " " . $variant;
    ?>
    				</h1>
    				<div class = "pdp-image-container"><div class = "pdp-image-helper"></div><?php the_post_thumbnail(); ?>
    				</div>
    				<div class = "pdp-top-info-container">
    					<h2 class = "pdp-sub-title">
    						<?php
    $product_group = get_the_terms( get_the_ID(), 'productgroep' )[0]->name ;
    echo $product_group . ", " . $variant;
    ?>
    					</h2>
    					<h5 class = "pdp-choise-criteria">Keuzecriteria</h5>
    					<div class = "pdp-price">Prijs vanaf ...
    					</div>
    				</div>
    			    </div>
    			</div>
    			<div class = "pdp-lister-container entry-content">
    			<?php //Filter area ?>
    				<div class = "pdp-filter-container">
    					<?php echo do_shortcode('[searchandfilter id=""]'); ?>
    					<?php echo do_shortcode('[searchandfilter id="153395"]'); ?>
    				</div>
    				<div class = "pdp-shopping-list-container">
    					<?php
    //Get all merchants
    $ean = get_field("ean");
    $args_merchants = array(
        'post_type' => 'merchant_offer',
        'tax_query' => array(
            array(
                'taxonomy' => 'ean',
                'field' => 'slug',
                'terms' => $ean,
                'compare' => '='
            ) ,
        )
    );
    $offers = new WP_Query($args_merchants);
    $all_merchants = [];
    while ($offers->have_posts()):
        $offers->the_post();
        $get_merchant = get_post_meta(get_the_ID() , 'merchant_id') [0];
        array_push($all_merchants, $get_merchant);
    endwhile;
    
    echo "all merchants: ";
    print_r($all_merchants);
    
    //Get filtered merchants
    //wp_reset_postdata();
    //wp_reset_query();
    $args_offers = array(
        'post_type' => 'merchants',
        'search_filter_id' => 153395,
        'tax_query' => array(
            //'relation' => 'AND',
            array(
                'taxonomy' => 'merchant_id',
                'field' => 'slug',
                'terms' => $all_merchants,
                'operator' => 'IN',
            ) ,
        )
    );
    
    $query2 = new WP_Query($args_offers);
    
    $filtered_merchants = [];
    $post_id_by_merchant = [];
    
    while ($query2->have_posts()):
        $query2->the_post();
        $get_filtered_merchant = get_post_meta(get_the_ID() , 'merchant_id') [0];
        array_push($filtered_merchants, $get_filtered_merchant);
        $post_id_by_merchant[$get_filtered_merchant] = get_the_ID();
    
    endwhile;
    //Get filtered offers by filtered merchants
    //wp_reset_postdata();
    //wp_reset_query();
    $args_filtered_offers = array(
        'post_type' => 'merchant_offer', //add filter id somewhere here!
        //'search_filter_id' => 165176,
        'tax_query' => array(
            'relation' => 'AND',
            array(
                'taxonomy' => 'ean',
                'field' => 'slug',
                'terms' => $ean,
            ) ,
            array(
                'taxonomy' => 'merchant_id',
                'field' => 'slug',
                'terms' => $filtered_merchants,
            ) ,
        ) ,
    );
    
    $query3 = new WP_Query($args_filtered_offers);
    //Build shopping list
     ?>
    						<div class = "pdp-shopping-list" id = "pdp-shopping-list">
    <br><?php
    echo "filtered merchants: ";
    print_r($filtered_merchants);
    ?>
    <br><?php
    echo "query 2: ";
    print_r($query2);
    ?>
    							<div class = "row header">
    								<div class = "item"></div>
    								<div class = "item">Winkel</div>
    								<div class = "item">Reviews</div>
    								<div class = "item">Basisprijs</div>
    								<div class = "item">Totaalprijs</div>
    								<div class = "item"></div>
    							</div>
    						<?php if ( have_posts() ) : while ($query3->have_posts()):
        $query3->the_post();
        setlocale(LC_MONETARY, 'nl_NL');
        $current_merchant_id = $post->merchant_id;
        $stars = floatval(get_post_meta($post_id_by_merchant[$current_merchant_id], 'reviewsterren', true));
        $review_amount = get_post_meta($post_id_by_merchant[$current_merchant_id], 'aantal_reviews', true);
    ?>
    							    <div class = "row">
    								<div class = "item logo"><?php echo get_the_post_thumbnail($post_id_by_merchant[$current_merchant_id]); ?></div>
    								<div class = "name"><?php echo get_post_meta($post_id_by_merchant[$current_merchant_id], 'name', true) ?></div>
    								<div class = "review-container"><div class="stars" style="--rating: <?php echo $stars ?>;" aria-label="Rating of this product is <?php echo $stars ?> out of 5."></div><div class = "reviews"><?php echo $review_amount . " reviews" ?></div></div>
    								<div class = "item price-actual"><?php echo money_format("€%.2n", $post->price_actual); ?></div>
    								<div class = "item price-total"><?php echo money_format("€%.2n", $post->total_price); ?></div>
    								<div class = "item view"><button class = "button"><a href="<?php echo $post->link; ?>" target="blank">Bekijken</a></button>
    							    </div>
    							</div>
    							
    						<?php
    endwhile; else : ?>
    	<p><?php esc_html_e( 'Geen producten gevonden.' ); ?></p>
    <?php endif; ?>
    						</div>
    <?php
    //wp_reset_postdata();
    //wp_reset_query();
    ?>
    
    				</div>
    			</div>
    		</main>
    	</section>
    </div>
    

    Thanks in advance.

    #229977

    Anonymous
    Inactive

    Hello Trevor,

    Thanks a lot for the hard work you guys put in this great S&F.
    I have a question.
    I try to get the filtered Categories shown above my filter results.
    As in: Categories: (here the filtered terms).
    I followed this advice: https://searchandfilter.com/documentation/accessing-search-data/

    And use now this code and get it in elementor with snippets:

    //Get a multiple fields values by passing an array of field names
    //replace 1526 with the ID of your search form
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(6890)->current_query();
    echo $sf_current_query->get_fields_html(
    array(“_sft_category”, “”)
    );

    What I notice are two things:
    1. with AJAX on, after the filter search, I need to refresh the page to get the code active/filled with the active terms
    2. If Ajax is off, it is automatically updating ( I think due to reload page).

    Can you help me to get this working with Ajax on?
    Thanks a lot in advance!

    #229944

    Anonymous
    Inactive

    Hi,

    I have these taxonomies:
    – Product
    – Merchant
    – Merchant offer

    I created a custom post template to make it possible to view all merchant offers for a product, with the possibility to filter on both merchant meta fields (review, payment methods..) as on merchant offer meta fields (price, delivery time..)
    Now I see that the S&F Pro plugin shows filter options for every existing post instead of the current viewed product. When you see my code below (this is my very first php-code, so when it is looking strange, that’s why), do you have a hint how to show only filter options for the current viewed product?

    <?php
    /*
     * Template Name: Product
     * Template Post Type: post, page, product, item
    */
    
    get_header(); ?>
    
    <?php
    $link = get_post_custom_values("link") [0];
    
    $color = get_post_custom_values("kleur") [0];
    //echo get_post_custom_values("product_group")[0];
    
    ?>
    
    <div id="content" class="site-content">
    	<section id="primary" class="content-area">
    		<main id="main" class="site-main">
    			<article id="post-2" class="post-2 page type-page status-publish hentry entry">
    			<div class = "pdp-full-top">
    			    <div class = "pdp-top-container entry-header">
    				<h1 class = "pdp-title">
    					<?php
    $brand = get_post_custom_values("brand") [0];
    $line = get_post_custom_values("line") [0];
    $type = get_post_custom_values("type") [0];
    $variant = get_post_custom_values("variant_value") [0];
    echo $brand . " " . $line . " " . $type . " " . $variant;
    ?>
    				</h1>
    				<div class = "pdp-image-container"><div class = "pdp-image-helper"></div><?php the_post_thumbnail(); ?>
    				</div>
    				<div class = "pdp-top-info-container">
    					<h2 class = "pdp-sub-title">
    						<?php
    $product_group = get_terms(array(
        'taxonomy' => 'productgroep',
        'hide_empty' => false,
    )) [0]->name;
    echo $product_group . ", " . $variant;
    ?>
    					</h2>
    					<h5 class = "pdp-choise-criteria">Keuzecriteria</h5>
    					<div class = "pdp-price">Prijs vanaf ...
    					</div>
    				</div>
    			    </div>
    			</div>
    			<div class = "pdp-lister-container entry-content">
    			<?php //Filter area ?>
    				<div class = "pdp-filter-container">
    					<?php echo do_shortcode('[searchandfilter id="165176"]'); ?>
    					<?php echo do_shortcode('[searchandfilter id="153395"]'); ?>
    				</div>
    				<div class = "pdp-shopping-list-container">
    					<?php
    //Get all merchants
    $ean = get_field("ean");
    $args_merchants = array(
        'post_type' => 'merchant_offer',
        'tax_query' => array(
            array(
                'taxonomy' => 'ean',
                'field' => 'slug',
                'terms' => $ean,
                'compare' => '='
            ) ,
        )
    );
    $offers = new WP_Query($args_merchants);
    $all_merchants = [];
    while ($offers->have_posts()):
        $offers->the_post();
        $get_merchant = get_post_meta(get_the_ID() , 'merchant_id') [0];
        array_push($all_merchants, $get_merchant);
    endwhile;
    //Get filtered merchants
    wp_reset_postdata();
    wp_reset_query();
    $args_offers = array(
        'post_type' => 'merchants',
        'search_filter_id' => 153395,
        'tax_query' => array(
            'relation' => 'OR',
            array(
                'taxonomy' => 'merchant_id',
                'field' => 'slug',
                'terms' => $all_merchants,
                'operator' => 'IN',
            ) ,
        )
    );
    $query2 = new WP_Query($args_offers);
    
    $filtered_merchants = [];
    $post_id_by_merchant = [];
    
    while ($query2->have_posts()):
        $query2->the_post();
        $get_filtered_merchant = get_post_meta(get_the_ID() , 'merchant_id') [0];
        array_push($filtered_merchants, $get_filtered_merchant);
        $post_id_by_merchant[$get_filtered_merchant] = get_the_ID();
    endwhile;
    //Get filtered offers by filtered merchants
    wp_reset_postdata();
    wp_reset_query();
    $args_filtered_offers = array(
        'post_type' => 'merchant_offer', //add filter id somewhere here!
        'search_filter_id' => 165176,
        'tax_query' => array(
            'relation' => 'AND',
            array(
                'taxonomy' => 'ean',
                'field' => 'slug',
                'terms' => $ean,
            ) ,
            array(
                'taxonomy' => 'merchant_id',
                'field' => 'slug',
                'terms' => $filtered_merchants,
            ) ,
        ) ,
    );
    
    $query3 = new WP_Query($args_filtered_offers);
    //Build shopping list
     ?>
    						<div class = "pdp-shopping-list">
    							<div class = "row header">
    								<div class = "item"></div>
    								<div class = "item">Winkel</div>
    								<div class = "item">Reviews</div>
    								<div class = "item">Basisprijs</div>
    								<div class = "item">Totaalprijs</div>
    								<div class = "item"></div>
    							</div>
    						<?php while ($query3->have_posts()):
        $query3->the_post();
        setlocale(LC_MONETARY, 'nl_NL');
        $current_merchant_id = $post->merchant_id;
        $stars = floatval(get_post_meta($post_id_by_merchant[$current_merchant_id], 'reviewsterren', true));
        $review_amount = get_post_meta($post_id_by_merchant[$current_merchant_id], 'aantal_reviews', true);
    ?>
    							    <div class = "row">
    								<div class = "item logo"><?php echo get_the_post_thumbnail($post_id_by_merchant[$current_merchant_id]); ?></div>
    								<div class = "name"><?php echo get_post_meta($post_id_by_merchant[$current_merchant_id], 'name', true) ?></div>
    								<div class = "review-container"><div class="stars" style="--rating: <?php echo $stars ?>;" aria-label="Rating of this product is <?php echo $stars ?> out of 5."></div><div class = "reviews"><?php echo $review_amount . " reviews" ?></div></div>
    								<div class = "item price-actual"><?php echo money_format("€%.2n", $post->price_actual); ?></div>
    								<div class = "item price-total"><?php echo money_format("€%.2n", $post->total_price); ?></div>
    								<div class = "item view"><button class = "button"><a href="<?php echo $post->link; ?>" target="blank">Bekijken</a></button>
    							    </div>
    							</div>
    							
    						<?php
    endwhile; ?>
    						</div>
    <?php
    wp_reset_postdata();
    wp_reset_query();
    ?>
    
    				</div>
    			</div>
    		</main>
    	</section>
    </div>
    

    Thanks again in advance.
    Best regards,
    Roeland van Oostenbrugge

    #229066

    Anonymous
    Inactive

    Hello,

    I’m using the plugin in ajax and infinte scroll mode. Display method custom.
    Displays random duplicates. Other pages appear when refreshing.

    And plugin display duplicated post:
    http://i.epvpimg.com/ReXUbab.jpg

    Settings:
    http://i.epvpimg.com/pEMPbab.png

    TPL code:

    
    <?php get_header();?>
    
    <div class="container">
        <div class="row">
            <div class="col-12">
                <div class="cars-stock-banner">
                    <?php 
    
                        $image = get_field('car-stock-photo');
                        $size = 'full'; // (thumbnail, medium, large, full or custom size)
                        if( $image ) {
                            echo wp_get_attachment_image( $image, $size, '', array( "class" => "lazyload" ) );
                        }
    
                    ?>
                    <div class="cars-stock-banner__content text-center">
    
                        <?php if (have_posts()): while (have_posts()) : the_post(); ?>
    
                        <?php the_content();?>
    
                        <?php endwhile; ?>
    
                        <?php endif; ?>
    
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-12">
                <div class="cars-stock-filters">
                    <!-- <div class="js-cars-stock-filters-button cars-stock-filters__button">
                        <?php _e('Filtrowanie (opcjonalnie)', 'cupra');?>
                    </div> -->
                    <div class="cars-stock-filters__form">
                        <?php echo do_shortcode('[searchandfilter id="464"]');?>
                    </div>
                </div>
            </div>
        </div>
        <?php
            $argsCars = array('post_type' => 'post');
            $argsCars['search_filter_id'] =  464;
            $queryCars = new WP_Query($argsCars);
        ?>
        <div id="cars-stock-ajax">
            <div class="cars-stock-infinite-scroll row">
                <?php if ($queryCars->have_posts()): while ($queryCars->have_posts()) : $queryCars->the_post(); ?>
                    <div class="col-12 col-sm-6 cars-stock-infinite-scroll-item">
                        <div class="row">
                            <div class="col-11">
                                <div class="cars-stock-item__img">
                                    <a href="<?php the_permalink();?>">
                                        <div class="cars-stock-item__location">
                                            <span>
                                                <?php the_field('location_car');?>
                                            </span>
                                        </div>
                                        <?php $foto = get_field('photo_1') ?>
                                        <img src="<?php echo $foto['sizes']['large'] ?>" alt="<?php the_title(); ?>" />
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12 text-right">
                                <div class="cars-stock-item-info">
                                    <a class="cars-stock-item-info__link" href="<?php the_permalink();?>" title="<?php _e('Zobacz więcej', 'cupra');?>">
                                        <h3>
                                            <?php the_field('marka'); ?>&nbsp;<?php the_field('model'); ?>
                                        </h3>
                                    </a>
                                    <p class="cars-stock-item-info__price">
                                        <?php the_field('cena_promocyjna'); ?>
                                    </p>
                                    <p class="cars-stock-item-info__parameters">
                                        silnik: <?php the_field('pojemnosc_skokowa'); ?>&nbsp;<?php the_field('moc'); ?>
                                    </p>
                                    <p class="cars-stock-item-info__parameters">
                                        skrzynia: <?php the_field('skrzynia'); ?>
                                    </p>
                                    <a class="cars-stock-item-info__more" href="<?php the_permalink();?>" title="<?php _e('Zobacz więcej', 'cupra');?>">
                                        <?php _e('Zobacz więcej', 'cupra');?>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div> 
                <?php endwhile; 
            
                else:?>
    
                        <span data-search-filter-action='infinite-scroll-end'><?php _e('Brak więcej wyników');?></span>
    
                <?php endif; ?>
            </div>
        </div>
    </div>
    <div class="pagination">
        
    </div>
    
    <?php get_footer();?>
    

    Anyone can help me?

    #227478

    Anonymous
    Inactive

    i create search form, i use shortcode, i create page with my shortcode but the results not good,
    i use like this:

    function select_artist_in_filter_page() {
    	$args = array('post_type' => 'artist','posts_per_page' => -1);
        $my_query = new WP_query($args);
       if($my_query->have_posts()) {
    		echo '<div class="elementor-container elementor-column-gap-default">
    		<div class="elementor-row">
    				<div class="elementor-element elementor-element-80b276a elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
    			<div class="elementor-column-wrap  elementor-element-populated">
    					<div class="elementor-widget-wrap">
    				<div class="elementor-element elementor-element-62b3681 elementor-grid-4 elementor-grid-tablet-4 elementor-grid-mobile-1 elementor-posts--thumbnail-top elementor-card-shadow-yes elementor-posts__hover-gradient elementor-widget elementor-widget-archive-posts" data-element_type="widget" data-widget_type="archive-posts.archive_cards">
    				<div class="elementor-widget-container">
    					<div class="elementor-posts-container elementor-posts elementor-grid elementor-posts--skin-cards elementor-has-item-ratio">';
            while($my_query->have_posts()) { 
    			$my_query->the_post();
                $custom = get_post_custom(get_the_ID());
    			$image = wp_get_attachment_image_src( get_post_thumbnail_id( $args->ID ), 'single-post-thumbnail' ); // the images for the artist	
    			echo '<article class="elementor-post elementor-grid-item post-170 artist type-artist status-publish has-post-thumbnail">
    			<div class="elementor-post__card">
    			<a class="elementor-post__thumbnail__link" href="'.get_permalink($args->ID).'">
    			<div class="elementor-post__thumbnail"><img height="150" src="'.$image[0].'" alt=""></div>
    		</a>
    				<div class="elementor-post__text">
    				<h3 class="elementor-post__title">
    			<a href="'.get_permalink($args->ID).'">'.get_field('artist_name').'</a>
    		</h3>
    				</div>
    				<div class="elementor-post_meta-data" style="text-align: center; background: #d80159;">
    				<a class="elementor-post__read-more" href="tel:'.get_field('Artist_Phone').'">'.get_field('Artist_Phone', $args->ID).'</a>
    				</div>
    				<div class="elementor-post__meta-data">
    					<span class="elementor-post-avatar">
    		המלצות: '.get_comments_number($my_query->ID).'	</span>
    				</div>
    					</div>
    						</article>';
    	   }
    		echo '</div></div></div></div></div></div></div></div>';
    	   wp_reset_postdata();
       }
    }
    
    function select_artist_in_filter_page_reset() { // reset the loop
    	ob_start();
    		select_artist_in_filter_page();
    	return ob_get_clean();
    }

    but i not see the real options, i see all artist i need to see the artist with location i choose in fitlers:
    https://mesibot.linuxisrael.co.il/filterresults/?_sft_location_artist=%d7%9b%d7%9c-%d7%94%d7%90%d7%a8%d7%a5
    this is the url

    way is not working ?

    #226945

    In reply to: Infinite Scroll


    Anonymous
    Inactive

    Hi Trevor,

    Apologies I’ve only just gotten around to trying this out, at the minute I get both messages coming up and I’m not entirely sure why, this is my results.php file.

    <?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=”flex-grid” data-aos=”fade-up”>
    <?php
    while ($query->have_posts()){
    $query->the_post();
    ?>
    <div class=”RoleGridWrapper col”>
    <?php if( get_field(‘scrub_colour’) == ‘navy-blue’){ $postcolor = ‘#153F74’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘cornflower-blue’){ $postcolor = ‘#5184C4’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘mediterranean-blue’){ $postcolor = ‘#009EC7’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘ocean-blue’){ $postcolor = ‘#64BFD4’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘pale-sky-blue’){ $postcolor = ‘#97BADE’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘dark-green’){ $postcolor = ‘#00A296’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘mid-green’){ $postcolor = ‘#92CEBD’; } ?>
    <?php if( get_field(‘scrub_colour’) == ‘silver-grey’){ $postcolor = ‘#ABAAAB’; } ?>
    <div class=”roleContWrapper” style=”border-top: solid 10px <?php echo $postcolor; ?>”>
    <div class=”cardTAB”>
    <svg id=”scrubsIcon” data-name=”Layer 1″ xmlns=”http://www.w3.org/2000/svg&#8221; viewBox=”0 0 40 40″><title>Scrubs Icon</title><path style=”fill:<?php echo $postcolor; ?>;” d=”M39.6,7.22a40.13,40.13,0,0,0-13-4.12,1.11,1.11,0,0,0-1.39.72c-.43.91-.88,1.73-.92,1.8-1.72,3.28-3.54,6-4.18,6.19-.66-.16-2.48-2.63-4.25-5.63-.46-.76-.8-1.42-1.25-2.28a1.29,1.29,0,0,0-1.52-.77A37.94,37.94,0,0,0,.4,7.22a.78.78,0,0,0-.32,1L3.47,15a.79.79,0,0,0,.9.41l3.49-.87L6.78,36.11a.79.79,0,0,0,.79.83H32.43a.79.79,0,0,0,.79-.83L32.14,14.57l3.49.87a.79.79,0,0,0,.9-.41l3.39-6.78A.78.78,0,0,0,39.6,7.22Z”/></svg>
    </div>
    “>
    <h3 class=”postHeader”><?php the_title(); ?></h3>
    <div class=”postCATS”>
    <?php
    $categories = get_the_category();
    $parentCatName = get_cat_name($categories[0]->parent);
    if ( ! empty( $categories ) ) {
    ?>
    <span class=”parentCAT”><?php echo esc_html( $parentCatName ); ?></span>
    <?php
    }
    ?>
    </div>
    <p class=”postIntro”><?php the_field(‘brief_role_description’); ?></p>
    <div class=”readmoreWrapper”>
    <p class=”postreadmore” href=”<?php the_permalink(); ?>”>Learn more</p>
    </div>

    </div>
    </div>
    <?php
    }
    }else{
    //figure out which type of “no results” message to show
    $message = “noresults”;
    if(isset($query->query[‘paged’])) {
    if($query->query[‘paged’]>1){
    $message = “endofresults”;
    }
    }
    if($message==”noresults”) {
    ?>
    <div class=’search-filter-results-list’ data-search-filter-action=’infinite-scroll-end’>
    <span>No Results Found</span>
    </div>
    <?php
    } else {
    ?>
    <div class=’search-filter-results-list’ data-search-filter-action=’infinite-scroll-end’>
    <span>End of Results</span>
    </div>
    <?php
    }
    }
    ?>

    Can’t seem to see why it’s not choosing one or the other, the only way at the moment I can get it to find no results is to search for something that I know isn’t available.

    Thank you
    Scott

Viewing 10 results – 41 through 50 (of 219 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.