• Hey!

    Awesome plugin.

    I just have a problem. I1ve attached two shots about the AJAX result. One of how is it working and one of how it should have. Could somebody help me please?

    Thanks,
    David

    postimage

    postimage

    Functions code:

    <?php
    add_filter('uwpqsf_result_tempt', 'customize_output', '', 4);
    function customize_output($results , $arg, $id, $getdata ){
    	 // The Query
                $apiclass = new uwpqsfprocess();
                 $query = new WP_Query( $arg );
    		ob_start();	$result = '';
    			// The Loop
    
    		if ( $query->have_posts() ) {
    			while ( $query->have_posts() ) {
    				$query->the_post();global $post;
                                    echo  ' <div class="col-md-6 col-lg-4">
        <div class="job-preview" style="background-attachment: fixed; background-size: contain; background-position: top center; background:
        linear-gradient(
          rgba(0, 21, 37, 0.6), rgba(0, 39, 68, 0.3)
        ), url('.the_post_thumbnail_url("custom-size", ["class" => "img-responsive responsive--full"]).')">
            <a href="'.the_permalink().'">
                <h2 class="post-title">
                    '.the_title().'
                </h2>
            </a>
            <p><strong> <i class="fa fa-map-marker fa-fw" style="color: #fff;"></i>
                                    '.the_field("helyszin").'</strong>
            </p>
            <div class="">
                <span><strong> <i class="fa fa-money fa-fw" style="color: #fff;"></i>
                                    '.the_field("oraber").'Ft/óra </strong>
                                </span>
                <span><strong> <i class="fa fa-clock-o fa-fw" style="color: #fff;"></i>
                                    '.the_field("munkaido").'</strong>
                                </span>
                <a class="btn btn-navy btn-block text-uppercase text-white" href="'.the_permalink().'">Részletek</a>
            </div>
        </div>
    </div>';
    			}
                            echo  $apiclass->ajax_pagination($arg['paged'],$query->max_num_pages, 4, $id, $getdata);
    		 } else {
    					 echo  'no post found';
    				}
    				/* Restore original Post Data */
    				wp_reset_postdata();
    
    		$results = ob_get_clean();		
    			return $results;
    }
    ?>
Viewing 1 replies (of 1 total)
  • Plugin Author TC.K

    (@wp_dummy)

    Try use get_the_post_thumbnail_url() instead. The the_post_thumbnail_url already echo included in the function.

Viewing 1 replies (of 1 total)
  • The topic ‘Results not look like as expected’ is closed to new replies.