From 4d217b25bf92b36f7712e8878dae365d61db6dae Mon Sep 17 00:00:00 2001 From: Ross Trottier Date: Tue, 2 Jul 2024 16:01:34 -0600 Subject: [PATCH] archive and search --- archive.php | 38 +++++++++++++++++++++++++++++ front-page.php | 1 - functions.php | 20 +++++++++++++++ header.php | 2 +- search.php | 37 ++++++++++++++++++++++++++++ style.css | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 archive.php create mode 100644 search.php diff --git a/archive.php b/archive.php new file mode 100644 index 0000000..2b889f1 --- /dev/null +++ b/archive.php @@ -0,0 +1,38 @@ + + +
+
+ post_count; + custom_breadcrumbs(); + if (have_posts()) { + while (have_posts()) { + the_post(); + $category = get_the_category()[0]; + $count++; + ?> + + +
+ +
+ + \ No newline at end of file diff --git a/front-page.php b/front-page.php index 5ddd44c..0f82e46 100644 --- a/front-page.php +++ b/front-page.php @@ -167,7 +167,6 @@ query_posts($post_section_three_featured_args); if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category()[0]; - $author = get_userdata( $post->post_author ); ?>
diff --git a/functions.php b/functions.php index 804b90e..aff0d1b 100644 --- a/functions.php +++ b/functions.php @@ -270,4 +270,24 @@ function custom_breadcrumbs() { } +} + +//paginate + +function list_pagination($count) +{ + global $wp_query; + $big = 99999999; + $paged = paginate_links(array( + 'base' => str_replace($big, '%#%', get_pagenum_link($big)), + 'format' => '?paged=%#%', + 'current' => max(1, get_query_var('paged')), + 'mid_size' => 0, + 'prev_next' => true, + 'prev_text' => __('<'), + 'next_text' => __('>'), + 'type' => 'list', + 'total' => $wp_query->max_num_pages + )); + echo $paged; } \ No newline at end of file diff --git a/header.php b/header.php index f78a1b2..d1d4a98 100644 --- a/header.php +++ b/header.php @@ -36,7 +36,7 @@ -

Slowtwitch

+

Slowtwitch