How To Insert An Element On The Home Page

Table of contents:

How To Insert An Element On The Home Page
How To Insert An Element On The Home Page

Video: How To Insert An Element On The Home Page

Video: How To Insert An Element On The Home Page
Video: 5 Key HOMEPAGE Design Elements - With REAL EXAMPLES 2024, November
Anonim

No other page on the site needs more improvements than the home page. It can be brought to the required form using hypertext markup and programming languages. And to complete the task, you will need to insert individual elements.

How to insert an element on the home page
How to insert an element on the home page

Instructions

Step 1

The easiest way is to add an element to your site, which is a combination of simple html pages. In this case, you need to insert the desired block on the main, save the result and upload it to the server. However, when using content management systems, the task becomes more complicated.

Step 2

Among bloggers, the most common engine is Wordpress, which in most cases displays the latest posts on the main page. Therefore, if you want the element to appear in only one place, paste it into a non-editable area. To do this, modify the index.php file, which is the main template. This can be done in two ways. In the first case, go to the admin panel, go to "Appearance" - "Editor", select index.php and insert the required element directly after the command to display the site header. It might look like this:. Also, a non-editable area is present before the "footer", i.e. you can add an element to the same file closer to the line, and it will be displayed at the bottom of the main page.

Step 3

If you have to insert a complex object, it is better to edit the file using the Notepad ++ program and upload it to the server separately. In case of errors or unwanted deletion of information, you can easily return everything back (this cannot be done in the visual editor of the admin panel). To work, open the index.php file in Notepad ++, insert the desired element immediately after or before. Upload the result to the server. The FileZilla program can be used for this purpose. In the sites section, select the one you want, add if necessary, write down the host and port settings, change the user from anonymous to authorized and be sure to specify the password and login provided by the hoster. In the right part of the program window, find the / public_html folder (site root), in the left - the edited file. Right-click on it and select the "Upload to Server" option. The file will first go to the task list and then download.

Step 4

The CMS part has a special directory for the main page. For example, in Joomla! there is a function to display content on the main page. And you can add text (along with pictures and other attributes) in several steps:

- go to the "Materials Manager";

- create a new material;

- mark as favorite with an asterisk.

The highlighted page will appear on the main page.

Recommended: