Answer the question
In order to leave comments, you need to log in
Wordpress how to make a static page but using php, js?
I can not understand how it should pick up the content of the pages. I do according to Habrostatya .
There are pages, there are menus. titles on articles are displayed if I create the main page and create main-page.php
And insert a JS slider and static text there. naturally does not pick up anything. And if you do as the author points out on Habré, it also does not work.
while if I post like this
<section>
<?php if (have_posts()): while (have_posts()): the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</section>
Answer the question
In order to leave comments, you need to log in
Understood already.
in the desired new template, insert a comment with the name.
/*
Template Name: main-page
*/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question