How to link pages Word Press Theme Creation

Asked

Viewed 16 times

0

I’m starting to create themes with wordpress, and do not know how to make the pages that I create in the panel appeared in my theme through the menu, the menu I managed to add through functions in functions.php and header.php, but the pages that I added in the menu through the panel do not appear when I click on them through the menu, I think it is because I have not configured the pages.php or something, I do not know well, I started now and do not know how wordpress works if someone can give me a light I appreciate ;)

1 answer

0

In wordpress you must create a file pages.php as default page, this file will be used to render all pages you create in wordpress admin. If you need a unique template for any page you need to add a comment template name at the beginning of your file. With this comment you can select the page template in admin.

<?php

 /**
  * Template name: Página de Contato
  */

 // Arquivo que vai renderizar a página de contato.

Browser other questions tagged

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