[gnomeweb-wp] added pagination for search page



commit 321ac63125eb322dbea38d1a386a4e810b3cac61
Author: Vinicius Depizzol <vdepizzol gmail com>
Date:   Tue Sep 7 20:10:28 2010 -0300

    added pagination for search page

 wp-content/themes/gnome-grass/images/go-next.png   |  Bin 0 -> 1455 bytes
 .../themes/gnome-grass/images/go-previous.png      |  Bin 0 -> 1430 bytes
 wp-content/themes/gnome-grass/search.php           |    9 ++++++
 wp-content/themes/gnome-grass/style.css            |   30 ++++++++++++++++++++
 4 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/wp-content/themes/gnome-grass/images/go-next.png b/wp-content/themes/gnome-grass/images/go-next.png
new file mode 100644
index 0000000..c4c0895
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/go-next.png differ
diff --git a/wp-content/themes/gnome-grass/images/go-previous.png b/wp-content/themes/gnome-grass/images/go-previous.png
new file mode 100644
index 0000000..33c5293
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/go-previous.png differ
diff --git a/wp-content/themes/gnome-grass/search.php b/wp-content/themes/gnome-grass/search.php
index 80a53cf..0de70e6 100644
--- a/wp-content/themes/gnome-grass/search.php
+++ b/wp-content/themes/gnome-grass/search.php
@@ -21,6 +21,15 @@ require_once("header.php"); ?>
                     <dd><?php the_excerpt(); ?></dd>
                 <?php endwhile; // End the loop. Whew. ?>
                 </dl>
+                
+                <?php if (  $wp_query->max_num_pages > 1 ) : ?>
+                <div class="page_navigation">
+                    <span class="prev"><?php previous_posts_link(__('Previous page', 'grass')); ?></span>
+                    <span class="next"><?php next_posts_link(__('Next page', 'grass')); ?></span>
+                    <div class="clear"></div>
+                </div>
+                <?php endif; ?>
+                
                 <div class="clear"></div>
             </div>
             <?php $footer_art = 'search'; ?>
diff --git a/wp-content/themes/gnome-grass/style.css b/wp-content/themes/gnome-grass/style.css
index 0edc2c4..f3a0b78 100644
--- a/wp-content/themes/gnome-grass/style.css
+++ b/wp-content/themes/gnome-grass/style.css
@@ -586,6 +586,36 @@ dl.icon_list dt img {
 
 
 
+/* Page Navigation */
+/* ========================================================================== */
+
+
+
+.page_navigation {
+    margin: 30px auto 0;
+}
+.page_navigation .prev, .page_navigation .next {
+    height: 32px;
+    line-height: 32px;
+}
+.page_navigation .prev a {
+    float: left;
+    background: url(images/go-previous.png) top left no-repeat;
+    padding-left: 40px;
+}
+.page_navigation .next a {
+    float: right;
+    background: url(images/go-next.png) top right no-repeat;
+    padding-right: 40px;
+    text-decoration: none;
+    color: inherit;
+}
+.page_navigation .next a:hover {
+    text-decoration: underline;
+}
+
+
+
 /* Footer Artwork */
 /* ========================================================================== */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]