Answer the question
In order to leave comments, you need to log in
How to create a separate blank page template (without header and footer) in Wordpress?
There is a site on Worpdpress, a header + content + footer template is used everywhere.
Now there is a need to create landing pages for this site, where the header and footer of the site are not needed. You only need the content part to stick the html of the landing there.
I make a php file with:
<?php
// Template Name: Landing Page
?>
I create a page through the admin panel, select a template, get a header + an empty content part + a footer.
I understand correctly that only requests like get_header and get_footer in the template files pull the header? Or are they connected somewhere besides this file?
I'm not strong in php and newbie in wordpress :)
Answer the question
In order to leave comments, you need to log in
All pages are generated by index.php files (for the main page), single.php (normal post), page.php (normal page). These files contain commands <?php get_header(); ?> and <?php get_footer(); ?> , which call header and footer.
Create a custom post type. If you are not strong in php, then using the More Types plugin is the easiest way to do this.
1. Install the plugin.
2. Create a new post type, for example Film
3. Create a single-film.php file
4. Paste all the necessary code into it, and delete the lines <?php get_header() ;? and <?php get_footer(); ?>. But be careful. Most often, the paths to CSS style sheets and scripts are written in the header. And also wp_head is written there, which plugins use.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question