• Resolved edodemo

    (@edodemo)


    Greetings!
    Thanks for the really useful plugin.
    I’ve noticed that when it comes to all the results, it goes to a template that I don’t understand. See also has offset graphics. Where can I change that page or at least tell it which page to show the results on? Thank you

    https://www.euromec2.it/?s=adheseal

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    Thank you for your kind words!

    The results page layout controlled and printed by the theme you are using and it’s triggered whenever the users visit your website and the ?s= query argument is present. For example yoursite.com/?s=test will trigger the results page from the phrase “test”. The plugin redirects to this archive, which is the results archive page.

    This page is not changeable in WordPress as it’s not an actual singular page but an archive. If your theme used a different URL structure to show the results maybe on a different URL or via a custom handler, then you can try to adjust it here: https://i.imgur.com/KtbV746.png

    If you know what the original results URL looked like, then I can very likely help you what exatly to enter as the custom results page URL.

    All the best,
    Ernest M.

    Thread Starter edodemo

    (@edodemo)

    Thank you! Yes this is the page I would like to land. Or another one that I can also make new. What should the php template be called?

    https://www.euromec2.it/categoria-prodotto/tutti-i-prodotti-innotec/

    Plugin Author wpdreams

    (@wpdreams)

    The template file for the results page is handled by the search.php in the theme root directory. Optimially it should have a while loop for the current query of posts, something like this for example:

    <?php if ( have_posts() ): ?>
    	<?php while( have_posts() ): ?>
    		<?php the_post(); ?>
    		<div class="search-result">
    			<h2><?php the_title(); ?></h2>
    			<?php the_excerpt(); ?>
    			<a href="<?php the_permalink(); ?>" class="read-more-link">
    				<?php _e( 'Read More', 'nd_dosth' );  ?>
    			</a>
    		</div>
    	<?php endwhile; ?>
    	<?php the_posts_pagination(); ?>
    <?php else: ?>
    	<p><?php _e( 'No Search Results found', 'nd_dosth' ); ?></p>
    <?php endif; ?>

    I am not very good at theme development though, these vary very much for each theme. The common part should be the while loop to print the posts from the current query.

    All the best,
    Ernest

    Thread Starter edodemo

    (@edodemo)

    Alright, so everything is handled by the search.php right?
    Thank you

    Plugin Author wpdreams

    (@wpdreams)

    It should be yes. That is basically the entry point whenever WordPress detects a search query triggered by the “s” query argument.

    Thread Starter edodemo

    (@edodemo)

    All right, it was a loop problem in the search page that didn’t work well and created the error. Now all set. Thank you

    Plugin Author wpdreams

    (@wpdreams)

    Great! You are very welcome.

    Feel free to rate the plugin if you like it, it helps me a lot.

    I will mark this topic resolved now.

    All the best,
    Ernest

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Results page problem’ is closed to new replies.