Pure HTML as homepage
-
Hi,
My clients company is divided into two deparments and need a custom homepage where you can choose which deparment to navigate to.
This is the logical sitemap:
company.com/ <- WordPress, but the whole site needs to be HTML only.
dep2.company.com/ <- Homepage of deparment 2. Subdomain with no WP.
company.com/home <- Homepage of deparment 1. Normal WPHow can I accomplish this? I’ve tried using a custom template to show the shared frontpage, however it included the navbar, sidebar and footer – it needs to be like a completely standalone landing page.
Thanks!
-
Lots to explain here – but the short and sweet would be as follows.
For your landing page (to choose which direction user wants to go), you need a static page. You can do this by copying your themes page.php and deleting the loop (usually this is in an article element – sometime not though. It should be commented though so you can find it easily.)
Name this page-index.php or page-home.php, something that you’ll register as your landing page. Include the template comment at the top
<?php /* Template Name: Home */ get_header(); ?>When you go into your WordPress dashboard go to: Appearance > Customize. You’ll see there on the left “Static Front Page”. Point Front Page to whatever you named your landing page template, and you can choose another page for your blog/posts feed. I normally create a page called page-articles.php for this one.
On your newly created page-index.php file – you’ll have to add your own content in order to direct users one direction or the other. Since you’re building a site in WordPress – you’ll have everything pointing to one page or the other, but you can go through this process to add whatever content you want to custom/static pages.
Thanks NovaSev for the response, will try this later today. Much appreciated π
There is one problem to your solution: the navbar and footer still presists. I want to use a completely custom HTML page.
I’m not certain why you’re using wordpress then? π
You can just add your own header and footer though in that one page and just not call the get_header/get_footer though.
I am using WordPress because of the blogging capabilities and the easy use of custom post types. And the reason the navbar and footer shouldnt be on the shared front page, is because the two websites are different (dep2.company.com/ and company.com/home) and therefor shouldnt be branded to either of them.
My theme, ShoeStrap, works in a different way than most themes. I guess I will have to ask them.
Ahhh I see. Well, in any case. You can create entirely static pages (html) even while using WordPress then. Just create a full page in html (you can find plenty of templates – I personally would suggest looking at Foundation Framewok).
Just don’t include the get_header, get_sidebar or get_footer and you’ll be set up with a fully html only page.
Yes this was my initial question. How do I create a entirely static page in html and use it as the front page? Not using the template method, as it does not work – and I don’t want to code the page in the text editor in WP. I just want to load a .html file whenever I navigate to the x.com/ page.
OOOO, okay π Let me lay some knowledge on ya π
You’ll have to create an html page – there is no way around this. It needs SOMETHING to be able to read and render. Do you have any coding skills? If not, this will be a possible downfall for you. You’ll also have to associate it with a css file in order to style it. All this is something I can’t exactly help you with in a post/comment.
After you have your page created, you just go into your Dashboard > Appearance > Customize and the left side menu will allow you to pick how you want to display your site (assuming your theme supports this). The block you’re looking for is called Static Front Page, you’ll want to select your home page as the page you just created and then assign another page for your articles (unless you already have a page associated with it – which is normal).
That will at least get you started. If you have no programming skills then I would look into Dreamweaver … I’ve never really had to get into that area personally.
Create you page in html. Link the menu items to the appropriate WordPess pages and to the other site.
I have 6 years of coding experience: C#, C, C++, HTML, PHP and Javascript. I am also know the logic behind creating a HTML page and adding a link to my other pages, but I don’t know how to use a HTML page as the front page in WordPress.
I just told you how to above in my last comment. Need to go to your dashboard and appearance.
I am completely aware of those settings, but it seems you are incapable of understanding my issue. No offense.
If I understand correctly, it can be done very easily.
Create your static HTML page, and save it as front-page.php in your active theme folder.
WordPress always looks for a file with that name first to show on the home page. If it’s there, it will display that as the root file of your site.
I see no way to do what you want to do. A html page opens with index.html and wordpress with index.php. Unless you can add something in either file to also run the other. Maybe a script?
Asking ShoeStrap is a good idea. http://shoestrap.org/forums/
Commercial themes are not supported on this forum. http://codex.wordpress.org/Forum_Welcome#Commercial_Products
A html page opens with index.html and wordpress with index.php.
@kmessinger : I think it’s perfectly fine to put static HTML code in a .PHP file, isn’t it?
The topic ‘Pure HTML as homepage’ is closed to new replies.