So i have a website and I want to create a blog for that website, so naturally I would just create a folder inside root directory called “Blog” and inside that folder I would install Wordpress and my url will be: “mywebsite/blog/index.php”
Is there any better idea for creating a blog for a website then this, because I want my URL to be “mywebsite/blog”?
In root directory I also have files like header.php and footer.php and I just include them in files. Is there any way to include for example header.php from ROOT to WP Theme folder? Because BLOG will have same header style and I want to use only one header.php for whole website.
How you do your includes is a personal decision. I happen to place all my includes in a single folder and include them as needed, using something like:
<?php include($_SERVER[‘DOCUMENT_ROOT’].“/include/footer.php”) ?>
You could use <?php include($_SERVER[‘DOCUMENT_ROOT’].“/footer.php”) ?> to include the footer in your root directory.
So I can inside file that is in theme folder, include a file from ROOT? and I dont mean root from WP, but real root
if your site has lots of pages, and you are going to promote ur blog continuously, u can create subdomain also Like … blog.mysite.com/
Yes, you can use the includes in any directory on your site. You do not need to have the includes in the same folder as your other site pages.