Welcome the the WordPress Stack Exchange and congrats on your first post! First off, you may not want to use query_posts()
here. Second off – the_post()
needs to be before the_title()
as it sets up all the posts functions such as the_title()
, the_permalink()
etc. and queues the next post in your while loop. Your Loop should look like this:
<?php
query_posts('post_type=post');
if (have_posts()) {
while (have_posts()) { the_post();
?>
<div class="blog_post">
<h2><a href="https://wordpress.stackexchange.com/questions/172563/<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="entry_date"><?php the_time('F jS, Y') ?></div>
<?php the_content(); ?>
</div>
<?php
}
}
?>
Hopefully that helps, here’s some more information on The WordPress Loop and setting up post data.
Related Posts:
- How to get posts published between a date and today?
- Display all posts from specific categories on a page
- How to exclude latest x posts from a paginated query?
- Display content from a specific category
- Can’t show comments count per post outside loop
- How to Display Post View Count
- How would I get 1 latest post from a query for 5 posts?
- Inserting custom data to the_post() during loop
- How To Get Posts With A Specific Word
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Display all posts that were published before full post on single.php
- Blog post per page setting conflicting with custom WP_Query?
- How to exclude latest x posts from a paginated query?
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- How to order posts in an arbitrary order?
- Display Posts on Custom Page
- Get the amount of posts on a current page
- How to get posts published on the latest date?
- How can I remove the first two words and shorten get_the_title()
- How to only publish posts with image in it
- WP_Query: Show 10 posts in date order, first three random
- Display specific posts on home page
- Display 3 posts with different HTML markup using a loop
- How to show post views shortcode data for each post on Posts List Page?
- Use special template for the first post in the loop
- Modify WordPress loop after it has been run
- show latest authors blog post
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Adding a category at even positions on main loop with modified pagination
- How to get all post titles starting with numbers and symbols?
- How to inject a post within a loop
- Print Current Post Index number within Loop
- the_author() returns empty string
- rewind_posts() – what actually the use of it, and where using is required or preferred?
- How to show list of posts by author and category?
- How to display posts by current user/author in a custom page template?
- post_name empty after wp_insert_post
- WordPress Number of Posts Not Changing With posts_per_page
- Find most recent authors
- Query only Posts from Both of Two Category?
- Insert custom div between posts
- Displaying the number of posts in a custom loop (without including the number of posts of a loop below)?
- Converting multiple loops into one single loop with pagination
- Exclude posts with empty post_content in wp_query
- Alternating post layout
- Check to see if specific loop has less than certain amount of posts
- is there a way to show the the post title after the image?
- Pausing and Resuming WP_Query results
- Post Loop Missing Most Recent Post
- Sharing post from archive page (loop) doesn’t work
- Display an author’s posts on his own author page
- Start WP Pagination From Number 1 in URL
- Use two different post_per_page limits with infinite scroll
- How to get posts from a current post’s month?
- Conditionals if tags exist?
- Change all author links in Blog roll
- Showing categories and subcategories with posts
- Posts – display all posts except a post by an ID
- Can’t get full post title if there a spaces in title
- why the same code got different results when using query_posts in functions.php and index.php
- older blog posts not showing in new theme
- WordPress Query Posts From Category Post on Static Page
- Loop through posts? Want to remove extra newlines in actual post HTML/content on backend
- How include css class based on post ( in loop ) slug?
- WordPress Loop: How to display recent posts in multiple divs
- Random posts that always include a particular post?
- Cannot implement byline into posts container in single.php
- How to check if there are posts with the same tag
- linking to post outside the loop
- WP_Query of Category Not Showing First Post
- how do I get the title in the post [closed]
- How come this loop is not working? [closed]
- Trying to query all posts in category 4
- Using the loop to set locations for all posts on a single google map
- Change content off every sixth element
- Want to change the post every three days with in specific category
- Separate top level categories on archive-product.php by meta
- While loop in functions.php outputting the_title() of each post on frontpage
- Shortcode for Comments and Comment Boxes in Post Loop
- Show posts from two specific category in WP_Query
- Permalink Short code showing unnecessary link text inside the loop
- How to create loop of posts except post ID defined via ACF field
- Displaying all posts from other sites on the network on one site
- How to display particular categorie’s post which associated to specific user?
- How can I get the last post while on the first post for pagination? As if it were infinite
- Double loop output
- post->ID displays the same ID number for every post
- How to correctly escape data
- Posts are not showing up on next page.
- Sort Events by Venue Title – Sort Post set by related post ids
- Post are not showing up
- Get posts by category or author
- How to make post button to a random post
- How to pass multiple checkbox values to wordpress query?
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- How do I create a template page to show 3 blog posts?
- posts_per_page – Repeats only first posts ‘post__in’ array
- query_posts different amount of posts per page [duplicate]
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- WordPress Ajax load doesn’t work