Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 921 through 930 (of 1,224 total)
  • Author
    Search Results
  • #57665

    In reply to: CSS Styling


    Trevor
    Participant

    OK, well that was interesting and should you need help on incorporating parts of an EDD post (such as the download button), please let me know, but, as we discussed, said ‘purchase’ button might look like this in our results.php template:

    <?php
      do_shortcode('[purchase_link text="Download Document" style="button"]');
    ?>

    The options for that shortcode are here:

    http://docs.easydigitaldownloads.com/article/229-purchaselink

    #57557

    Trevor
    Participant

    The tag I used (unless I forgot on one or two) was results.php

    Each persons is unique. If you want, I can show you over skype video conference.

    #57490

    Ross
    Keymaster

    Just to add, a very quick test locally using this in my results.php

    	<!-- this is some kind of comment -->a
    	<!-- this is some kind of comment -->b
    	<!-- this is some kind of comment -->c
    	<!-- this is some kind of comment -->d

    Results in the following output, as expected:

    a b c d

    #57480

    Ross
    Keymaster

    Hi Melinda

    S&F creator here..

    I’ve just seen you’ve left a bad review… Not good to hear 🙁

    Can I try to help you get setup?

    The confusion here is that, S&F does not do any parsing of the template file – so S&F does not have any function that could or would add <p> tags.

    So your results.php, will be read in exactly as it is…

    As you’re the only person reporting this issue I have to assume something in your setup is causing the results file to be parsed in this way on initial page load.

    You also mention that when using Ajax the <p> tags disappear – this to me says that when an ajax request is performed, that S&F gets the clean html (before some other strange parsing has occurred) and displays the results as they should be – as in, it leads me to believe that somethign in your setup is parsing the PHP file an extra time, and converting line breaks in to <p> tags..

    If you want to try to resolve the issue (and I am keen to know the cause) I would recommend creating a temporary user for us to login and have a quick look around.

    I would also suggest (yes its annoying) but to disable other plugins that are active, if you want I can do this for you?

    Best

    #57456

    Trevor
    Participant

    This post was originally caused by the incorrect end tags for paragraphs. That was all it was, and it was fixed. It did somehow creep back in again, but with 2.2.0 we again fixed it. No other spacing issues were observed.

    What I see happening is this. In your results.php file you have code like this (simplified by me!!):

    <div>blah foo</div>
    <!--end details-->          
    <div>blah foo</div>

    And the browser is receiving this:

    <div>blah foo</div>
    <p><!--end details-->
    <div>blah foo</div>

    Somehow the start <p> is added and without an end to it. And then mayhem follows as this cascade impacts on anything that follows on the page.

    Our plugin only uses a standard PHP include to bring the results.php in with, so it would not do that. However, WordPress, a plugin, or even your theme may be doing it.

    #57284

    Trevor
    Participant

    Using the shortcode method, you can personalize the results.php template, as detailed in the documentation:

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

    The structure of the template is fairly simple. You can move blocks up or down, change what is being called (for example add a link to the post to the thumbnail), you can add HTML and css classes.

    I have done many of these customized results.php templates for other users and posted them on the forum. The key is to do it one bit at a time, try to use an existing page from the template as a guide, and avoid complications, such as masonry or istotope.

    If you say that the archives method is a problem, then use the shortocde one. It is the only method I ever use.

    #56842

    Trevor
    Participant

    Hi

    are you using a copy of results.php in your child theme? You also name the file, for example, if your S&F form has an ID of 545, the result.php file can be named 545.php. See here:

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

    #56378

    Trevor
    Participant

    Can you copy and paste here your results.php template file contents, inside code tags (one before, one after, they are little back ticks from the key next to the 1 key)?

    #56333

    Trevor
    Participant

    Here is the ‘starter’ results.php for your Thrive theme:

    <?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>
     <div class="scbgi tt-search-results-posts-container" id="tt-search-results-container">	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div class="scc left">
    			<?php
    				if ( has_post_thumbnail() ) { ?>
    					<a class="rmich" href="<?php the_permalink(); ?>">
    						 <div class="rimc" style="background-image: url('
    						<?php the_post_thumbnail_url("small");?>
    							')"></div>
    			  </a>
    			<?php	} ?>
    
    			<div class="scbt">
    				 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    			
    		 	 <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>
    
    		<?php
    	}
    	?>
     </div>
    	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";
    }
    ?>

    Let me know how you get on and if I can close the thread?

    #56277

    Anonymous
    Inactive

    Hi

    Is for the form.

    I would change not only the style but also html CSS, such as change lists (<li>) by divs

    I see that there is a template for results (results.php), I think it would be very interesting to have also php templates for forms.

    Thanks

Viewing 10 results - 921 through 930 (of 1,224 total)