Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 931 through 940 (of 1,224 total)
  • Author
    Search Results
  • #56234

    Anonymous
    Inactive

    The post-meta dropdown menu that comes with S&F Pro.

    I could use custom JS…but I kinda want to keep this all on the results.php page if possible.

    This page in the doc’s touches on this a little bit I think? However, I couldn’t get any of the code to actually work with my results.php page

    https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/#Access_the_Active_Query_Object

    #56029

    Trevor
    Participant

    Hi

    It depends on the display results method that you are using. If you are using the shortcode method, then unless your theme has been written specifically for Search & Filter, then it must use the results.php file. To use a template of your choice, you must use the As an Archive method.

    It is possible to edit the results.php file to make it look and feel like a theme template file. I have done and shown this to other users. This is somewhat dependent upon the theme. Some themes make this very hard to do and as such outside of our normal technical support.

    #56004

    In reply to: Grid View Kalium Theme


    Trevor
    Participant

    The weekend past was a holiday weekend (it was a National holiday here until today), so apologies for the slightly tardy reply.

    A couple of questions. Did you make a custom results.php as shown here in the documentation?

    Am I able to see this page live (working)? If it is behind a ‘coming soon’ screen, please send me logins. I may need to see the admin of the site, if so, I will need admin logins.


    Anonymous
    Inactive

    Hi,

    I’m trying to get the selected value of a dropdown menu in the results.php file. Based on the selected text, I’d like to show some unique text in the results file (if/else if statement, etc).

    Is this possible to do?

    Thanks,

    Matt

    #55884

    Trevor
    Participant

    1. Are you using the shortcode display results method?
    2. Can you show me a live link to your current page?
    3. If you have modified the results.php file (as per the documentation here), can you please post here (inside code tags – there is a code button in the editor toolbar, to be used before and after code, or you can use a back tick instead – the button next to the 1 on the keyboard) the results.php file?
    4. Can you show me a (live link) page in the Enfold theme that DOES have a two column grid, either on your site OR on a demo site page?

    #55622

    In reply to: Grid View Kalium Theme


    Trevor
    Participant

    In our sample results.php file, I found some html errors that I hope we have since fixed, but you may still have them.

    Around the tags and other parts, we had put <p> tags (paragraph), which should look like this:

    <p><?php the_category(); ?></p>
    <p><?php the_tags(); ?></p>
    <p><small><?php the_date(); ?></small></p>

    but the end tags were wrong on the 2.1.2 version (at least), so they looked like this:

    <p><?php the_category(); ?><p>
    <p><?php the_tags(); ?><p>
    <p><small><?php the_date(); ?></small><p>

    Can you see that the end slashes are missing? This causes most browsers to convert these to extra line breaks (<br>).

    #55492

    Trevor
    Participant

    A customized results.php for you:

    <?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() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	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>
    <ul class="penci-grid">
    
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
      <li class="list-post">
        <article id="post-3238" class="item">
          <div class="thumbnail">
    			<?php 
    				if ( has_post_thumbnail() ) {
    					echo '<p>';
    					the_post_thumbnail("thumb");
    					echo '</p>';
    				}
    			?>
    					</div>			
          <div class="content-list-right content-list-center">
            <div class="header-list-style">
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    							</div>			
            <div class="item-content">
    									<p><br /><?php the_excerpt(); ?></p>
    							</div>
    					</div>
        </article>
      </li>
    		
    		<?php
    	}
    	?>
    </ul>
    	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";
    }
    ?>

    Anonymous
    Inactive

    I spent the last two hours going through support searching through Divi articles and I’m still pretty confused on how to make things work. Is there documentation or a thread where someone was successful in making it work with the Divi theme?

    On this page: http://goo.gl/1dKJRb

    There is the gray bar at the top. I’m not sure what the best way to do this, but I made three search filters in that grey bar 1) search meals 2) categories 3) filter items (tags)

    All three have the post type “Products” selected, the display results method is “as an archive”, and the custom template set as “search-results.php”

    – This field seems to work, I think I need to customize the search-results.php. Has another Divi user been successful with doing this?
    – The categories #2 only pulls in uncategorized, but I have a category that should be there.
    – The placeholder for #3, “filter items” is not showing (it’s supposed to pull tags here and I have two tags created)

    Appreciate the help. 🙂

    #55336

    Anonymous
    Inactive

    forgot to mention…

    The results template in my theme is the same (copied) as the one in the SF Pro plugin folder:
    SF Pro > Templates > results.php

    Line 25 is:
    if ( $query->have_posts() ) …….. etc.

    #55325

    Trevor
    Participant

    You had set an unfinished condition on the Post meta tab of the setup, and that meant no results. I have removed it.

    Also, your PHP setup on the server needs the mbstring extension. This is used a lot by WordPress, odd that it is not there?

    Make sure that the results.php template you are using is a copy, in the child theme folder, per the documentation:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

Viewing 10 results - 931 through 940 (of 1,224 total)