Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 951 through 960 (of 1,224 total)
  • Author
    Search Results
  • #54317

    Anonymous
    Inactive

    Hi, I mentioned this issue on another thread but figured I’d start my own. I’m a little confused on how this works.

    From my understanding I can only have 1 “search” field on S&F. I would like two search fields to search through separate custom field keys (Not ACF fields, just regular custom fields). The fields are “First name” and “Last name”.

    I kinda understand I need to have two different search fields on ACF and then integrate that into S&F. I understand how to place the fields on the page…but not sure how to integrate it into the query to display results on results.php. Is this done in a .php file in S&F? If so, which file would that be?

    Much thanks.

    #54293

    Anonymous
    Inactive

    Ok, I found the setings – thanks much!

    Also, just to clarify, I still want the results of these searches to appear in the results.php page. Will ACF work well with S&F? I’m not familiar with that plugin.

    #54248

    Trevor
    Participant

    I didn’t delete the css, but as the page has changed also some CSS may need to be re-written. The form element headings are in the form UI bits you dragged and dropped into the form. Look for the option Add a heading?

    Once you have added all the bits you need, make a screenshot and play with it by cutting and pasting where you want stuff, what want to be bigger, smaller, different font/size and link to it here. I can then advise.

    For those others who might use the Hemlock theme from Solo Pine Designs, this is the customized results.php I wrote:

    <?php
    /**
     * Search & Filter Pro
     *
     * Sample Results Template
     *
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     *
     * 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() )
    {	?>
    
      <ul class="sp-grid">
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		?>
    		<li>
          <article id="post-<?php the_ID();?>" class="item">
    
    			<?php
    				if ( has_post_thumbnail() ) { ?>
    					<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail("thumb");?></a>
    			<?php	}
    			?>
            <div class="item-content jpibfi_container">
              <span class="cat"><?php the_category(", "); ?></span>
              <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
              <input class="jpibfi jpibfi-ignore" data-jpibfi-url="<?php the_permalink(); ?>" data-jpibfi-description="<?php the_title(); ?>" type="hidden"><span class="more-button"><a class="more-link" href="<?php the_permalink(); ?>">Read More</a></span>
        			<br /><span class="date"><?php the_date(); ?></span>
            </div>
    
          </article>
    		</li>
    
    		<?php
    	}
    	?>
      </ul>
    
    	<div class="pagination">
    
    		<div class="older"><?php next_posts_link( 'OLDER POSTS <i class="fa fa-angle-double-right"></i>', $query->max_num_pages ); ?></div>
    		<div class="newer"><?php previous_posts_link( '<i class="fa fa-angle-double-left"></i> NEWER POSTS' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #54101

    Trevor
    Participant

    as I haven’t heard back from you I hope all is OK? This results.php below works in Divi. The user wanted the results in a column that was 75% of the page width, the search form was in a sidebar in the other 25%.

    The pavigation and post titles are full width, and the content is thumb to the left and excerpt to the right, taking up 1/3 and 2/3 of the 75% column width:

    <?php
    /**
     * Search & Filter Pro
     *
     * Sample Results Template
     *
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     *
     * 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="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_center">
    	   <?php echo $query->found_posts; ?> gefundene Ergebnisse<br />
    	    Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    
    	    <div class="pagination">
    
    		    <div class="nav-previous"><?php next_posts_link( 'Seite zurück', $query->max_num_pages ); ?></div>
    		    <div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	   </div>
       </div>
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		?>
    		<div>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
          <div class="et_pb_row_inner et_pb_row_1-4_1-2">
            <div class="et_pb_column et_pb_column_1_4 et_pb_column_inner">
              <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
          <?php
            if ( has_post_thumbnail() ) {
              echo '<a href="';
              the_permalink();
              echo '">';
              the_post_thumbnail("small");
              echo '</a>';
            }
          ?>
              </div>
            </div>
            <div class="et_pb_column et_pb_column_1_2 et_pb_column_inner">
              <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left">
          			<p><br /><?php the_excerpt(); ?><p>
    			      <p><?php the_category(); ?></p>
    			      <p><?php the_tags(); ?></p>
    			      <p><small><?php the_date(); ?></small></p>
              </div>
            </div>
          </div>
    
    		</div>
    
    		<hr />
    		<?php
    	}
    	?>
      <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_center">
    	Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    
    	  <div class="pagination">
    
    		  <div class="nav-previous"><?php next_posts_link( 'Seite zurück', $query->max_num_pages ); ?></div>
    		  <div class="nav-next"><?php previous_posts_link( 'Seite vor' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	  </div>
      </div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #54097

    In reply to: results.php as a grid


    Trevor
    Participant

    This was the results.php modified to work with the Newspaper 7 theme (by TagDiv):

    <?php
    /**
     * Search & Filter Pro
     *
     * Sample Results Template
     *
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     *
     * 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() )
    {
    	?>
    
    	Es wurden <?php echo $query->found_posts; ?> Wetsuits gefunden<br />
    	Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br />
    
    	<div class="pagination">
    
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    
    	<?php
      $td_count = 0;
    	while ($query->have_posts())
    	{
    		$query->the_post();
    if ( $td_count == 0 ) { ?>
      <div class="td-block-row">
    <?php } ?>
    		<div class="td-block-span6">
          <div class="td_module_1 td_module_wrap td-animation-stack">
    
          <?php if ( has_post_thumbnail() ) { ?>
            <div class="td-module-image">
              <div class="td-module-thumb">
                <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    					<?php the_post_thumbnail("thumb");?>
    					</a>
            </div>
          </div>
    			<?php	} ?>
    
          <h3 class="entry-title td-module-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    
    		  </div>
        </div>
    <?php
    $td_count = $td_count + 1;
    if ( $td_count > 1 ) $td_count = 0;
    if ( $td_count == 0 ) { ?>
      </div>
    <?php }
    	}
      if ( $td_count == 1 ) { ?>
        hello</div>
    <?php }
    	?>
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    
    	<div class="pagination">
    
    		<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    		<?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    	</div>
    	<?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    #53990

    In reply to: results.php as a grid


    Trevor
    Participant

    OK. My brain better be awake then!! OK to do first thing in the morning? I will do it one careful step at a time. I will only alter the results.php which should not cause any issues. I have already got a backup of it here.

    #53926

    Trevor
    Participant

    I will, I will also be working on your/divi results.php layout in a bit (overslept).

    #53845

    Trevor
    Participant

    mmm

    The HTML on the Search results is still faulty. Is the results.php the same as shown in the OP:

    https://support.searchandfilter.com/forums/topic/customize-result-php-with-table/#post-53355

    #53763

    In reply to: Grid View Kalium Theme


    Trevor
    Participant

    To answer that last question first, it would depend on the theme you use. I know that for the theme framework I use, the theme author re-wrote their code to specifically detect the presence of S&F Pro and to get it to work. I have not seen that from any of the other page builder authors.

    As long as you have a ‘normal’ sample page that you want the results to look like, and that code doesn’t use special javascript (such as masonry), it isn’t so hard to modify the results.php file to make them look much the same. I can help you do that.

    #53737

    Anonymous
    Inactive

    Hei..
    I work with taxonomies instead of categories. So for each post in the search result it appears the categoryname “uncategorized”. How can I hide this? If I delete the line <p><?php the_category(); ?><p> in results.php, it doesn’t display the category anymore, but then only one result insteat of all results appears. Can you help me?

    Thanks, Micha

Viewing 10 results - 951 through 960 (of 1,224 total)