archive blog page (3 posts)

  1. mydigitalfamilyorg
    Posted 4 years ago #

    If you go to my permalink http://mydigitalfamily.org/?page_id=925, you will see a blank page where the archive to all of my posts should be displayed. In my http://mydigitalfamily.org/wp-admin/theme-editor.php I have files that should link the "Page" "Archive" to my website page, but it is just not working.

    Can you please tell me which file in my http://mydigitalfamily.org/wp-admin/theme-editor.php is responsible for making the posts appear on http://mydigitalfamily.org/?page_id=925?

    Can you also, please tell me or fix the code so that the posts all appear on the site?

  2. The file that you want is called page-template-archives-php

    If you look at the source code, in the body tag, there are several classes added to it, one of which is page-template-archives-php which means that this page uses that template.

    Do display the archives, you need to use the function wp_get_archives()


  3. mydigitalfamilyorg
    Posted 4 years ago #

    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(); ?>
    <h1 class="entry-title">
    printf( __( 'Dr. S %s', 'mydigitallife' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    <ul class="archive-posts">
    $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) {

  4. 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>
  5. <div style="height: 10px;"></div><HR WIDTH="100%" SIZE="1" NOSHADE><div style="height: 10px;"></div>

    <!-- #content -->
    <?php get_sidebar(); ?>
    <!-- content part end-->
    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic