I am using this template, thank you. Where and how do i use function wp_get_archives()? Thank you so much for your help. If you need more files to look at, I can show you them here. This is what is contained in my Archive Page Template (archives.php):
<?php /* Template Name: Archive */ ?>
<?php get_header();?><!--content part-->
<div class="left_main_content_container">
<div id="content" role="main">
<div id="breadcrumb"><?php the_breadcrumb(); ?>
</div>
<h1 class="entry-title">
<?php
printf( __( 'Dr. S %s', 'mydigitallife' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
<ul class="archive-posts">
<?php
$query = "SELECT post_title, MONTH( post_date ) AS month , YEAR( post_date ) AS year, DAY( post_date ) AS day , id FROM $wpdb->posts WHERE post_status = 'publish' AND post_date <= now( ) and post_type = 'post' ORDER BY post_date DESC";
if ( $posts = $wpdb->get_results($query) ) {
foreach ($posts as $post) {
$categories = get_the_category($post->id);
$category = $categories[0];
$cat_id = $category->cat_ID;
if ($cat_id!=6) {
?>
id)?>"><?php echo $post->post_title ?>
<span class="date"><?php echo date("j/n/y",mktime(0, 0, 0, $post->month, $post->day, $post->year)) ?></span>
<div style="height: 10px;"></div><HR WIDTH="100%" SIZE="1" NOSHADE><div style="height: 10px;"></div>
<?php
}}
}
?>
</div>
</div>
<!-- #content -->
<?php get_sidebar(); ?>
<!-- content part end-->
<?php get_footer(); ?>