Installation of the template to a specific Wordpress page
-
I'm trying to connect to the name page. http://localhost/site/page-contacts/ new template. That's what I wrote in the file.
page-contacts.php
next code<?php get_header(); ?>
<div class="container"> <div class="row"><br> <?php $post = get_post($post_id = 7); // Записываем все данные записи 7 в объект $post echo '<p>'.$post->post_content.'</p>'; // Выводим контент записи; ?> </div> </div>
<?php get_footer(); ?>
But it only turns out the contents of the futher and the hider, which should be added to remove the tape from such an aide? (I checked, there's a record on the database with that idy)
-
<div class="container"> <div class="row"><br> <?php $post = get_post(7); // Просто 7 echo wpautop($post->post_content); // Позвольте Wordpress самому разобраться с форматированием текста, с помощью функции wpautop ?> </div> </div>