WordPress.org

Ready to get started?Download WordPress

Forums

Search results improvement (5 posts)

  1. Myslovo
    Member
    Posted 11 months ago #

    Hi,

    First, I'm not techie, so sorry if something here seems stupid..

    I have a website, it's in Ukrainian, but I use English WordPress, and really hope that a little different letters don't confuse you..

    So, when I do search, it only gives me 5 results. As lond as I understand it corresponds to the number of posts per page. I increased it from 3 to 5. But making it 50 looks stupid, so I need a solution, which I hope to find here..

    I've read that there is pagination, but cannot figure out how I can do that..

    So, here is an example of search: http://myslovo.com/?s=%D0%BF%D0%BE

    The theme is custom, the code of search.php is:

    <?php get_header(); ?>
    
      <div class="sixteen columns">
        <div class="alpha eleven columns">
          <?php
          if (have_posts()) :
             while (have_posts()) : the_post();
              get_template_part( 'loop', 'titles' );
             endwhile;
          else : ?>
          <h2>Не знайдено визначень &quot;<?php echo get_search_query(); ?>&quot;</h2>
          <p>Будь ласка, повторіть ваш пошук.</p>
          <?php endif; ?>
        </div>
        <div class="omega five columns">
          <?php get_sidebar(); ?>
        </div>
      </div>
    
    <?php get_footer(); ?>

    if you need some other code please let me know

    what I would like to get now, if it's possible, is 10 search results per page with pagination, while leaving 5 posts per page (or even going back to 3).

    please let me know if you have any questions/comments/replies

    thank you
    Best regards,
    Alex

  2. Myslovo
    Member
    Posted 11 months ago #

    songdogtech, thank you!

    now I'am able to set number of search results (I like 10). But I still don't have pagination..

    this plugin has " — paged (non first page)" field, where I put different numbers, but no result, still one page of results

    So, maybe you have any ideas about pagination, I will now search for "pagination" in plugins, but maybe you already know some good..

    thanks again,

    Alex

  3. Best thing to do is try different plugins and find what you want; they're all a little different. I use http://wordpress.org/extend/plugins/wp-paginate/

  4. Myslovo
    Member
    Posted 11 months ago #

    thanx, songdogtech!

    though that plugin didn't work, you inspired me to finally switch-on my brain, and I found this page: http://codex.wordpress.org/Function_Reference/paginate_links

    that piece of code at the bottom works! and using your first plugin advice, Im now having what I wanted: pagination with 10 results per page! The only problem is the words "next page", "previous page" are in English, not Ukrainian, but as long as I understand, that's coz I use English WP.

    thanks again,

    Alex

Reply

You must log in to post.

About this Topic