September 28, 2015 at 1:03 am #166815September 28, 2015 at 7:30 am #166840Victor FontModerator
Permalinks are used globally by WordPress. If you add /blog to your permalinks, every page and post will have /blog/. Rather than mess with the permalinks, this should work if you create proper parent/child relations the pages, and parent/child categories for your posts. If you set permalinks to postname, the breadcrumbs and URL will show the structure you want.
September 28, 2015 at 3:55 pm #166891unkleeMember
Hi Victor, thanks for your reply. But I'm sorry, I don't understand how to remove the /blog without moving WordPress out of the /blog directory.January 16, 2016 at 5:55 am #176675unkleeMember
I don't know if anyone will ever read this, but I have managed to make the WordPress static home page the home page for the whole website while keeping the WordPress install in the /blog directory and keeping the URL for posts as sitename/blog/postname.
It was actually quite easy, so I thought I'd document it here if anyone else needs to do it.
At the start, the main website (including the home page) was HTML, and the whole WordPress install was in the /blog directory.
1. Go the WP Dashboard, Settings, General and change Site address to the root URL (but don't change the WordPress address) and save.
2. Copy (not move) the WP index.php and .htaccess files into the root.
3. Edit the index.php file (near the end) so that it reads
require( dirname( __FILE__ ) . '/blog/wp-blog-header.php' );instead of
require( dirname( __FILE__ ) . '/wp-blog-header.php' );and save.
4. Login to site at old address, go to the Dashboard, Settings, Permalinks and reset permalinks by adding /blog - before I had filename/%category%/%postname/", now I have filename/blog/%category%/%postname%/
5. Amend links in main menu as necessary.
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.