Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 971 through 980 (of 1,224 total)
  • Author
    Search 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.

    #51790

    Trevor
    Participant

    Hi

    Can you post here your modified results.php code? To make sure that the code you post here does not get mangled by the forum script ….

    Before the block of code and after it needs to be a code tag. On my screen, above where I am typing this, I can see the formatting buttons (bold, italic etc) and the last but one is the code tag button. Press this once before and once after the code. You will see it actually types a ‘back tick’, if you can see the button bar that is. Otherwise, on my keyboard, the symbols button to the left of the 1 key also types the same back tick.

    #51732

    Trevor
    Participant

    Hi

    Sadly the code you posted has gotten mangled by the forum script 🙁

    Before the block of code and after it needs to be a code tag. On my screen, above where I am typing this, I can see the formatting buttons (bold, italic etc) and the last but one is the code tag button. Press this once before and once after the code. You will see it actually types a ‘back tick’, if you can see the button bar that is. Otherwise, on my keyboard, the symbols button to the left of the 1 key also types the same back tick.

    Can you re-post the results.php code?

    #51731

    Trevor
    Participant

    Have you made any changes to the results.php file, as detailed in the documentation:

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

    NB, this forum doesn’t work with replies by email 🙁

    #51590

    Trevor
    Participant

    Yes.

    The results.php is the generic default catch all file.

    If your form has an ID, say, of 15, the specific results file would be 15.php

    So, you can have many results files, each matching its own form in name == id

    Can I close this and mark it resolved?

    #51588

    Trevor
    Participant

    No, not a stupid one. It is entirely logical. I should have thought of that. Too hot here.

    So, as per the docs:

    Customising the Results

    If you wish to customise the display of your results, you must override the default template that is being used by Search & Filter:

        Create a folder in your theme folder called search-filter.
        Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.php

    From now on, Search & Filter will load this version of the template instead of its own – so you can make any customisations that are necessary.

    #51002

    Trevor
    Participant

    Also in the docs.

    Instead of results.php, if your form is id 545, for example, you can use 545.php and so on.

Viewing 10 results - 971 through 980 (of 1,224 total)