Home WordPress: Posts Not Displaying Properly on Posts Page
Reply: 0

WordPress: Posts Not Displaying Properly on Posts Page

user1271 Published in July 22, 2018, 8:06 pm

In order to try to learn WordPress, I decided to make myself a static portfolio site and covert it over. All is well so far, but when I try to create a custom page for my blog posts (page-blog.php), <?php the_title(); ?> and <?php the_content(); ?> only show contents of the page itself, and not my individual posts. Screenshot of front end

The code is here. I've tried a couple of solutions here on the Stack that suggested to clear cache and mess with the database, a custom WP_QUERY solution from DigWP, and reading and re-reading the Codex, but no luck. I was able to display the correct post titles and content with the solution from DigWP, but <?php the_permalnk(); ?> redirects to the home page.

What I've done to get here is create the custom page for the blog (page-blog.php), and use it as a template for the blog page I created in the back end of WP. The text showing in the first screenshot is the title and content of the page, not the posts.

Basically, I want my blog posts to display on a separate page from my index.php. Is that not possible with WordPress, or do I have to display blog contents on index.php? Thank you for taking the time to read this!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.314823 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO