Answer the question
In order to leave comments, you need to log in
Attaching a landing page to a blog?
Hey!
Please tell me the easiest and best way to do it. I have a landing page in html, I need a blog for it. I'm thinking of using a wordpress blog template so as not to write a blog from scratch (but just change the template for myself). How can I properly attach my landing page to WordPress and blog template? There is only one article on the net about how to attach a WordPress blog to a landing page (web-andryshka.ru/kak-prikrutit-k-lendingu-blog-na-wordpress/), but there are many jambs that pop up with css loading, and indeed I Seems like an inappropriate approach.
Answer the question
In order to leave comments, you need to log in
You can do the following:
- Define in the theme on wordpress, where the blog is supposed to be placed, 2 files:
- - header-landing.php
- - footer-landing.php
Accordingly, in them, in the header you define styles, head and so on. scripts in the footer. And you stuff the middle part into index.php in the theme folder, moreover, I suspect that your landing page will be on the main one (and this index.php will be responsible for this), and in the menu there will be an item somewhere, for example with an arbitrary link "Blog", it will lead to the address, for example site.ru/category/posts (well, for this you create the posts section from the box in wp and shoot your posts there)
index.php:
// в шапку выносишь все то, что ты хочешь видеть в шапке, то есть, то что постоянно на каждой странице тут
<?php get_header("landing"); ?>
// здесь html твой, средней части лэндинга
// тоже самое футер, срипты итд
<?php get_footer("landing"); ?>
<?php
$args = [
'theme_location' => 'menu_name'
];
wp_nav_menu($args);?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question