Posts on page specifies Wordpress

Asked

Viewed 166 times

1

I am working with wordpress and am customizing the index keeping the top and footer:

<?php get_header(); ?>
<?php get_footer(); ?>

only that when I go into the settings and point out the "Blog" page as the posts page they do not appear (image below).

configuração do wordpress

Where do I point this manually? Or I’ll have to create and set up a "blog.php" page on the theme page?

Alias, I do not know if it is correct to change the home page in the index of the theme... Thank you!

1 answer

1


Oops! I found the answer and it worked.

First I went to my theme folder and copied the page.php(works with index too) and renamed to blog.php

After that defined it as a "Blog" page template at the very beginning of the file:

<?php
/*
Template Name: Blog
*/
get_header(); ?>

I went to the page I created and changed the following option in quick edit: mudando blog

And I made the last change to "Options > Reading":

configurações

As I wanted to display all the posts, only this was enough :D

  • 1

    Instead of renaming, it is better to make a copy. A page.php is used as default for any page that does not have Model defined (the "Default Template" that appears there in the screenshot).

  • Thanks for the tip, man, I didn’t know.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.