Search Results for 'results.php'

Forums › Forums › Search › Search Results for 'results.php'

Viewing 10 results – 1,071 through 1,080 (of 1,344 total)
  • Author
    Search Results
  • #53378

    Anonymous
    Inactive

    sorry,I didin’t check your files properly,
    I found my target code on results.php.
    I try by myself for a while.

    Let me talk to you if I’m stuck again,
    Thanks

    #53357

    In reply to: Grouping posts by year


    Trevor
    Participant

    The date type field in S&F seems allow only a year drop down select form element. You can sort by date, but cannot group them in any way (it is not possible to add a header for each year for example). At least, you cannot do this easily. With the shortcode results method, you can have results.php file that you can edit. As long as the posts were already sorted by date, it WOULD be possible (not by us) to write PHP code to extract the year from the date and compare this to the previous post, and make a new heading if it had changed.

    You COULD also have a list of years in a column where the links in them had the necessary code in to send the chosen year to the results. Again, not something we would do for you.

    #53352

    Trevor
    Participant

    The first step is to have your own copy of results.php in the theme folder, as explained here:

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

    Do you have an example page in the desired format I can see?

    #53303

    Trevor
    Participant
    #53285

    Trevor
    Participant

    Hi Connie

    First question. Did you make your own custom results.php file?

    As here:

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

    As you are not too far north of me, if you have a mic or webcam, I can show you to start you off.

    #53217

    Trevor
    Participant

    Which Display Results method are you using? You should not be using Custom, as this is reserved, for Shortcode I can show you how, the other methods use templates from your theme, so you would need to investigate how to modify them. The shortcode method output can be customized, and to start with read the documentation and make your own custom results.php file:

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

    #53061

    Trevor
    Participant

    You are not able to show me the page URL? 🙁 This makes it almost impossible to show you how.

    Did you follow these instructions for a custom results.php file?

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

    Then you must look at an example of a results in a table page in your theme and edit and re-code the results.php file to make it look and work like your example theme page.

    #52392

    Trevor
    Participant

    Hi Stephanie

    Is this with you using the Shortcode method?

    If so, did you do this:

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

    And, having copied the results.php file there, if you open it, you can see the different parts and you can re-arrange it. OR if you have a sample page of what it needs to look like from your theme, I can write it for you.

    #51832

    Anonymous
    Inactive

    Trevor, thanks for the reply. I’m using the shortcode method. I’d appreciate it if you can tell me how to work with the results.php file.

    I managed to find the follow code from the Enfold forum:

    <?php
    global $avia_config;
    
    /*
    * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    */
    get_header();
    
    $results = avia_which_archive();
    echo avia_title(array(‘title’ => $results ));
    ?>
    
    <div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
    
    <div class=’container’>
    
    <main class=’content template-search <?php avia_layout_class( ‘content’ ); ?> units’ <?php avia_markup_helper(array(‘context’ => ‘content’));?>>
    
    <div class=’page-heading-container clearfix’>
    <section class=”search_form_field”>
    <?php
    echo “<h4>”.__(‘Andere zoekopdracht’,’avia_framework’).”</h4>”;
    echo “<p>”.__(‘Vul hier Uw nieuwe zoekopdracht in:’,’avia_framework’).”</p>”;
    
    get_search_form();
    echo “<span class=’author-extra-border’></span>”;
    ?>
    </section>
    </div>

    Do you know exactly where in the results.php template that I can paste this into? Or would this code even work in the first place if I want to display the results as a grid?

    I’m assuming I would need to place the above code at some place in this section, correct?

    <?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div>
    			<h5><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
    <br>
    		</div>
    		
    		<hr />

    Thanks for your help!

    #51794

    Trevor
    Participant

    It depends on what template is being used for the results. If you are using the shortcode method, it uses our results.php template. You can edit this to give you a grid (you can modify it to look and behave like a theme template). If you are using as an archive or Post Archive methods, they use your theme’s templates, in which case uses one that has a grid.

Viewing 10 results – 1,071 through 1,080 (of 1,344 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.