drupal how to customise drupal homepage with own html - html

I'm very new on Drupal 7, I've been trying to customize my home page by adding my own html on page.tpl.php, which works fine but my problem is that the what I add on the home page appears on all the other pages as well and I don't want that.
Can anyone tell me is the anther instead of page.tpl.php where I can put my html code so it show only on the home page or is there code I can insert so my html appears only on the home page?
please help, and please give a step by step solution as I'm a noob when it come to Drupal.
thank you in advance...........

The Template file must be named as
page-front.tpl.php(Drupal 6)
page--front.tpl.php(Drupal 7)
This only affects the front page of the site.

You can use the template files
page-front.tpl.php (Drupal 6)
page--front.tpl.php (Drupal 7)
Put page-front.tpl.php (Drupal 6) OR page--front.tpl.php (Drupal 7) in your themes
folder (/sites/all/themes/your_theme), and then clear the site chache here:
http://yoursite.com/admin/config/development/performance (Drupal 7)
http://yoursite.com/admin/settings/performance (Drupal 6)
Your templates will work.

You can use panels to quickly customize the page. And you can specify any page as front page in Drupal. Go to Configure > site information and set the front page.
Panels gives you flexibility in building the layout & adding content on it. Its the quickest way to build a custom page in Drupal

There is variable available in page.tpl.php that return true if you are in front page :
$is_front, you can check that before you add your htmls

Related

Creating a plain html home page AMP with WordPress running the other pages

Gday
I like to know how you would go about creating a home page in plain html and have WordPress run the other pages?
The reason is I’d like to create a solely plain html website but I need WordPress for my contact page it has a large form on it and I use a plugin to generate it and forms are a bit beyond my knowledge at the moment to create a contact page myself.
(I have tried creating a template page but then WordPress adds unnecessary code [from plugins ] and makes the AMP invalid)
Honestly I'd try and keep it self contained in WordPress itself.
If for some reason you really want a separate HTML/PHP Homepage, follow these steps:
Add a my-homepage.php file to your /wp-content/themes/ACTIVE-THEME directory
Inside that file put the following code:
Add a new page (Pages > Add New)
Give it a recognizable name like "My Homepage"
In the "Template" selector on the right hand side, pick "My HTML Homepage" and click Publish
Go to Settings > Reading, change Your homepage displays to A static page and pick the page you just made
Now you can add your own code as you see fit. Nothing "WordPress" related will get loaded or hooked in since there's no functions on that file - so you're free to code HTML (or PHP) to your heart's content.
You can see a bit more indepth answer over on WPSE: https://wordpress.stackexchange.com/questions/296592/how-to-use-custom-html-file-instead-of-wordpress-homepage

How do I change the theme of only one page in WordPress

I have an general education landing page in Wordpress, thats needs a new theme. I want to just change that ONE page but not impact any other page. I have a business premium account with Wordpress. Please help, thank you.
You can't change the theme just in one page. To customize that page you would need to create a custom template by creating a template or a file on your server to only affect that page.
Something like:
Page templates
Or:
page-87.php 87 being the page ID
front-page.phpIf the page you want to costumize is the front page
page-landing.phpIf the name of the page is "landing
This might help: WpBeginner

Best way to redirect?

I got a website made in Wordpress, and it's not finished yet but I want people to be able to only visit a certain link.
Let say my website is: www.mywebsite.com, and the only section finished is www.mywebsite.com/gallery.
Inside the gallery I have several links, that should work. (those links open new pages).
However, if people go to www.mywebsite.com, it should redirect them to www.mywebsite.com/gallery.
I've seen several different redirect plugins, but I'm unsure what would be the best choice.
I want something simple that just works.
HTML meta-tag:
<meta http-equiv="refresh" content="1; URL=http://www.foobar.com/gallery">
PHP header function:
header("location: /path/to/folder");
JavaScript:
window.location.href = "http://www.foobar.com/gallery";
I suggest you to put a file (index.php) into your root folder and write the following in it:
<?php
header("location: gallery/index.php");
?>
But if you have no PHP on your Server you can also use the method with HTML or JavaScript as well.
I hope this helps :-)
Since mwatzer answer seems correct to any website, I would strongly suggest to use a plugin or change your start page by setting your gallery page as home page, WordPress automatically removes scripts inside pages and entries, and if you change your template files, on the next template update they will be gone unless you create a child theme.
Check WordPress Codex here: WordPress changing home page
Or check this plugin: Quick Page/Post Redirect Plugin

Index page in Joomla

I have made a homepage in Joomla 2.5, and I need my front page to be different then the page made in Joomla.
My best solution then, is to make the front page in pure HMTL, and then redirect to the site made in Joomla. Is this possible? or is there an easier way to do it? for example with a plugin or something?
Create a custom html page and create it an article and then assign this article to front page. In this way you can display your custom html page to hope page of joomla.
Further if you want to remove even the headers and footers of the joomla page for home page this can be done in various ways
Make module positions and display the header and footer in it an
then in admin do not publish these modules for home page
We have
variable in template index.php which give us flags weather this is
home page you can use this flag and put a condition like if this is
home page dont display the header and footer.
Hope it will help you.
I can't really understand your question. If you want to load HTML only use custom HTML module rendered in your homepage
What are you trying to achieve? Without knowing more, I have two thoughts.
a. Joomla uses index.php. A lot of the time web servers look for index.html first. So if you create an index.html file and upload it to your root folder, it will display that first and not read your Joomla! site. If that doesn't work, check your web server to see the order that it looks for your start page. That is a setting that can be changed. (Depending on your hosting situation)
or b. You can set different templates for a single Joomla! site. you could set a different template for the homepage compared to the rest of the site. (I just need to know more on what you are trying to accomplish)
Have a great one.

Can I replace domain.com/images/ to something like #/images/?

Hi I'm making a basic HTML website using Microsoft WebMatrix locally. When I've finished the website I will be uploading it to my web hosting.
Right now I'm using http://localhost:80/ to view my site and I'm using this sort of code...
<!--#include virtual="include/html/menu.html" -->
... to include the menu links so that I only have to change 1 file to change the menu across the whole site.
Here's the problem. The menu links have to have the full address like...
Service
to make sure they work on every page. Not...
Service
I could put http://localhost:80/service/index.html as the full address link and it would work. But, when it comes to uploading the site to domain.com the links would be broken and I'd have to change them everytime I upload a newer version of the site.
Is there anything like this...
Service
... where a sign, for example #, would be whatever domain the site is on?
While starting with http://etc is an absolute path, and starting with ../ is relative to the document in question, starting with / will be relative to the root of your site.
So your example would simply be Service.