Loop pulling in page data instead of post
-
I am trying to add a WP blog to an existing static site. I have created a page template and included the loop in the page where I want the blog.
However the loop is pulling in data for the page using the template instead of my posts.
The page is
https://www.lakeviewchristianfellowship.com/wp/?page_id=15
Reflections is the name of the page that holds the blog. The loop I took from the default template but I all I wrote produce the same results.
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <?php the_content('Read the rest of this entry »'); ?> <?php the_tags('Tags: ', ', ', '<br />'); ?> <!-- Posted in <?php //the_category(', ') ?> |--> <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Loop pulling in page data instead of post’ is closed to new replies.