WordPress start page. Making the home page static in WordPress. When to avoid creating static pages

By default, the home page of a WordPress blog is the page that displays the most recently published posts (or announcements). But the posts page can be made not the main one and named, for example, “Latest posts” or “Blog”, and assigned home page with other, possibly static content. In this article:

Creating a Static Home Page

You can use one of the permanent pages as the main page:
In your WordPress admin panel, create at least two pages (Pages>Add New).

1. Home page

Give one page the title you want to use for your home page, such as "Home", enter the content of the page, and publish it.

*** You can create a separate custom template for this page, the name of which should be different from home.php, because otherwise it may cause conflict.

2. Posts page

Name the second page “Blog” (or “News”, “Articles”) and publish it. This page will show blog posts (announcements), so you don't need to add content to it (it is ignored) and use a custom template for it.

3. Settings

On the administrative page of the Reading settings(Reading) select option " Display on the main page - Static page", indicate the pages you want to use as home page("Home") and like posts page(“Blog”) and save your changes.

4. Menu

If your theme uses a menu of permanent pages, such as the header (theme file header.php) or the blog sidebar (theme file sidebar.php), the page you designate as the main page will also appear in this menu. To exclude this page from the list of pages that appear in the menu, you need to change the corresponding theme template that is used for this master page.

Changing Theme

Excluding a page from the menu

Displays a menu of pages function, for which you can set the exclude parameter to the id of the page (or pages) that you want to exclude from the menu, or for the include parameter, list the ids of the pages that you want to include in the menu, separated by commas (here the id of the main pages =10):

Home Page Selection

In a template, you can choose content for the main page that is different from the content for other pages by using is_front_page() returns true when the home page assigned in Settings is displayed as shown above. For example, on the main page you don’t have to display sidebar. To do this, in the theme's index.php file, instead of the line

you need to write:

Programmatic home page selection

wp_insert_post() allows you to programmatically create About and Blog pages.

ID); update_option("show_on_front", "page"); // Post pages (blog) $blog = get_page_by_title("Blog"); update_option("page_for_posts", $blog->ID); // Switch to the theme //switch_theme("Template", "stylesheet"); ?>

is_home() and is_front_page()

is_home() checks whether the current page is a posts page.
is_front_page checks whether the current page is the main page of the site.
By default in WordPress the main page is the posts page, so the functions is_front_page() And is_home() both check for being on the main page.

To edit the home page template, you can also change the necessary parameters in the code yourself. The index.php file is responsible for the order in which elements are displayed. Download it to your computer using an FTP client, hosting control panel, or open directly through the Code Editor in WordPress. All records are displayed in blocks

Each of which has a specific purpose and settings. For example,

Responsible for displaying site information and headers. A more detailed list of all possible parameters is given in the documentation for the engine. After making changes, do not forget to upload the edited file back to the hosting using an FTP program.

note

If after making the settings the main page is not displayed, check that the specified parameters are correct and refresh the page.

Depending on the engine version, the name of the mentioned settings items may change.

Sources:

  • how to change byword in wordpress
  • Setting up a WordPress 404 page

Hypertext Markup Language (HTML), provides the ability to separate page into several windows - “frames”. Each of the frames can have its own internet source to display. This mechanism can be used to insert pages from other sites into pages from your site.

You will need

  • Text editor Notepad

Instructions

The HTML code of a page is a set of instructions that tells where on the page each of its elements should be displayed and what it should look like. These instructions are called “tags,” and to create a page that contains one or more others, you need to write a corresponding set of tags. We need to start with tags that create a container for all page frames:
...
These are the opening and closing tags of the container - the tags that form the frames will need to be placed between them. IN HTML tags have “attributes” - they contain additional information about the properties of the page element whose display is specified by this tag. In the container's opening tag, you need to specify an attribute containing information about how the browser should divide the page space between its frames:
...
The "cols" attribute in this code sample specifies that the page should be divided vertically into two frames, with the left one taking up 20% of the window's width and the right one taking up 80%. If instead of the "cols" attribute you specify the "rows" attribute, then the page will be divided horizontally:
...
Instead of a number you can use (*):
...
This will mean that the second frame will be given all the remaining space. Frame sizes can be specified not in , but in the units of measurement that are most often used when marking pages - in “pixels”:
...

The HTML tag of the frame itself, which needs to be placed in the container, is written like this: The "src" attribute of the "frame" tag contains the address of the Internet page that the browser should load into this frame. An address written in this way is called “absolute” - it begins with the indication http protocol://. But if this is a page of your own site and it is located in the same (or subfolder) folder, then the absolute address is not necessary, just the file name and path to the subfolder will be enough. Such an address will be called “relative”: --Borders between frames in the default page can be moved with the mouse. This feature is disabled by the noresize attribute: --There are two attributes that determine the size of the margins between frames - marginheight sets the vertical margin (top and bottom), and marginwidth sets the horizontal margin (right and left): --Using another attribute - "scrolling" - you can tell the browser rules for frame scroll bars: A value of "auto" specifies that scrollbars should appear as needed, that is, when the content does not fit within the bounds of the frame. If you set the value to "yes", then this frame will always have scrollbars, and the value "no", on the contrary, prohibits displaying scrollbars. --If the pages contained in the container work with any JavaScript scripts that perform operations in neighboring frames , then it may be necessary to distinguish frames by name. The attribute containing the name of the frame is called name:

These definitions HTML language It is quite enough to create a simple page from several pages of other sites. For this you will need anyone text editor, for example standard Notepad. In it, create a new document and write these html code tags:




Then save this code with an htm or html extension - for example, test.html. Everything is ready, if you open this document in a browser, the result will look like this:

There is another type of frame - “floating”. It can be located inside a regular page, not divided into frames. Such a frame has additional width and height attributes that specify its dimensions. For example, the code for this tag might look like this:

If, when designing websites, a web designer is guided by his own ideas about beauty, the page may end up not being very convenient to view. To solve this problem, each browser has the ability to configure the display of pages independently.

Instructions

If you are using Internet Explorer, right-click on the browser icon to bring up the drop-down menu. Select the "Properties" command. On the General tab, in the Views section, click Colors to customize the displayed color palette of web pages.

Uncheck the "Use" checkbox Windows colors» and choose your own colors for the background, font and links on the page. If you want the link color to change depending on its state (normal, active, and viewed), check the “Change color on hover” checkbox.

Left-click on the color swatch box to bring up the color palette. Mark the desired shade and confirm your choice by clicking OK. If you don't find a color tone that suits you, click the Specify Color button to bring up an expanded color picker.

To set your preferred languages ​​when the panel is displayed, click Languages. By default, the list will contain the language specified when Windows installation. To add new language, click the corresponding button and select from the list in the “Add a language” window.

If a web page does not have a custom font installed, the one you have assigned in your browser settings will be displayed. Click Font and select a font type and size. To ensure that only your settings are used when browsing websites, click Appearance and select the appropriate checkboxes.

To customize page display Opera browser In the drop-down menu, select the commands “Settings” and “ General settings" On this page you can assign the font type and size, background color and links. If the page is too large and does not fit entirely on your monitor screen, select “Page” and “Fit to Width” in the main menu.

To customize the display of websites in Mozilla, from the Tools menu, use the Settings command and go to the Content tab. Set the font type and color using the “Color” and “Advanced” buttons. Select a size from the list. In the Languages ​​section, click Select to add a language to your preferred list.

Video on the topic

WordPress, despite its accessibility, is a rather complex CMS. It is not always clear how you can customize a particular page. However, once you understand the basic principles and functionality, you can create any option you need.

Typically a WordPress site will display the latest posts on its home page, but is it possible to configure the site to show the same posts and links over and over again? For those who are just starting to get acquainted with WordPress, we have prepared a small guide on how to set up this feature.

In this article, we will look at the process of setting up and using static pages in WordPress, as well as cases in which it is and is not advisable to do this.

How to set up a static home page

Before we look at which sites should have static pages and which ones should not, let's learn how to properly set up these types of pages using the WordPress admin panel.

Here are step by step instructions:

2. New page name it "Home" or "Main" and fill it with any content as a template.

4. If you don't have any posts, write a few in drafts.

5. Go to Settings → Reading in the control panel.

6. Select: On the main page display → Static page.

7. For " Home page"Select the page you created earlier called "Main" or "Home".

8. For " Post pages" select the created page "Posts" or "Blog".

9. Now let's move on to the section Appearance → Menu in the control panel. Let's add a new menu with the "Home" option, which leads to your home page, as well as "Blog" or "Posts" links for the corresponding pages we created earlier.

10. Now open a new window in the browser and enter address bar our website address. We find the menu and see if there are new links to the “Blog” or “Posts” pages? If there are links, we check whether they lead to the static pages we created.

That's it, we have set up static pages for the WordPress site!

When to Use Static Start Pages

Now that you know how to create and configure a static page for your site, it's time to learn when you should (or shouldn't) use such pages. Let's start with scenarios for potential use of static pages on a website:

  • Business pages. On the pages of an online store, service or company, you can display the main news or updates in the catalog of goods and services offered using a static list.
  • Landing pages. Usage landing pages makes sense in a situation where a review of a product or service on YouTube is linked to a referral link leading to a specific section or promotion. And instead of the entire list of products, after clicking on the referral link, the user will see a specially designed page for a specific product.
  • Pages of non-profit organizations and foundations. To display the key projects on which a foundation or organization worked, it is convenient to not only maintain a blog, but also create a page with a list of links and logos for completed projects. You can also attach a button for quick donations there.
  • Portfolio. Key facts about the specialist and the projects in which he participated, as well as the attached resume, are best displayed using a static page.
  • Online stores and forums. A list of products or topics is best displayed using a static page.

Sometimes it is also useful to have a separate news or blog page, as shown above, to separate different types content from the main list of goods or services offered.

When to avoid creating static pages

There are also situations when using static pages is undesirable:

  • Blogs. Of course, the blog is built on dynamic content and new publications. No visitor or regular blog reader will be interested in seeing the same content on the main page every time.
  • Cases and portfolio. If you have new products or projects (as is always the case with graphic designers, application and game developers), then it makes sense to display the latest projects on the main page, rather than constantly keeping your portfolio in a “mothballed” form. Alternative option It could be the creation of a separate page for key facts and the most important projects, which can be accessed from a dynamically generated portfolio.
  • News pages. A static page on a news site as a start page will look a little strange and will definitely not add popularity to the news site: after all, everyone is interested in the latest news, and not repetition of the same thing.

Finally

In this article, we learned how to create and customize static pages. We also looked at cases in which such pages should and should not be used on your website. We hope that everything described will be useful in your work.

WordPress one of the most responsive and popular systems for managing and creating a website. The number of available extensions (the so-called plugins), the abundance of themes with different designs and functionality make it easy to create a business card website, portal, or online store. The scope for creative thought is enormous, but it begins WORDPRESS still with home page. If you have just installed WordPress, It’s time to make adjustments to suit your needs, and at the same time you need to take into account a thousand important details if you want to make a pleasant and visited blog, and not put together an auto-filled GS (shit website). So let's work on wordpress home page.

Before working on your WordPress site, I want to remind you a few important points things you need to know:



Basic files in wordpress

You shouldn’t immediately jump into the style sheet or mindlessly edit the following files:

  • index.php (this is what displays the main page of the site);
  • header.php is responsible for the site header; it also opens a tag, after which, by the way, the codes for all traffic statistics counters are placed;
  • style.css is responsible for the template style, it specifies appearance site elements (this is where the miracles of editing the main page in WordPress will work).

All possible methods: from simple to complex

WordPress is a very flexible system that provides many options for editing the home page and design. For example, you can use the standard features of the control panel or directly correct the code in index.php - but in this case you must know exactly what and how you want in the end, otherwise your WordPress site will simply be unavailable and you will have to return everything to the starting point.

Where to find places where you can edit the main page of the site, like the rest of the other pages:

  • Admin panel;
  • hosting file manager;
  • With using ftp client (FAR or FileZilla)

Let's look at how to edit the home page through the WordPress admin panel. On the one hand, this is the simplest method, but on the other hand, it does not allow code errors to occur. So be careful.

Standard settings

The easiest way to set up the home page is in standard editor. That is, edit the topic. There are editing options depending on the template you choose. Most often, you can simply change the background color, image, site name, text color. You can also make changes to the menu, work with WordPress widgets. Special attention When editing a theme, you should pay attention to the “static home page” tab. This is where you specify which page you choose to be your home page.

File style.css - style sheet

You should start editing the main page of the site with the style.css file. It's quite easy to find. First, you need to log into the admin panel of your WordPress. In the console, find the Appearance tab and go to the style.css file. This is a fairly large text file.

After you make all the changes, do not forget to click the “update file” button to save the changes.

So, the Description line is responsible for describing the topic; the version, author, and tags that will be used further are also indicated there. Just below the style.css file is a list of values ​​used in all pages of the site: headers, field indents, lists.

In WordPress, after the body tag you can make your own changes:

  • background color;
  • size, color, font style;
  • background scrolling;
  • shape and size of the displayed page.

For example:

Background: url(images/bg_g.jpg) repeat #000 fixed; color: #2c2b2b; font: normal 12px arial; line-height: 18px; position: relative.

In this case, the value “#2c2b2b” means the color that the text will have.

All values ​​that are defined like: background: url(images/sprite_master.jpg) are used to edit images. These can be completely different versions of png: from buttons to pictures and backgrounds. Graphic files must be uploaded to the storage directory and links to them are taken from there and inserted instead of “sprite_master.jpg” as in our example.

For example, the custom_header block is responsible for creating a picture in the header of the main page. It may be referred to as default_header.jpg. The method for changing it is described above. It is also possible to change the image size. For example, if there were 2500 x 1600 pixels, then for effective display it is better to set 1800 x 600.

It is important to remember that each of the hundreds of parameters in the style.css file is responsible for a specific area of ​​the site.

Static page

In order to make a main page that will be static. This means that certain text will be visible on any of the pages. This option is necessary for pinning news or advertising on your site; unfortunately, it is available for older versions of WordPress.

Results of changes

Changing templates in WordPress is not that difficult. For beginners, it will be useful to visit the website wordpress-theming.ru, where a description and examples of various themes are given for installing them on your portal. Those who want a more difficult route can edit the home page of their site themselves.

Here we described one of the ways to edit the home page for your website through the admin panel. Besides this, there are two more ways. They are somewhat more complex and require more user training. Before starting with them, we can advise you to have a good practice with the main page in the style sheet.

The home page is the front door of every WordPress site. It seems so obvious that when creating a website, you should immediately start creating a key page. But as practice shows, for most “craftsmen” making the main WordPress site is an impossible task. This problem already at the start weeds out young, failed bloggers who have never known success in running their own Internet project. To prevent this from happening to you, follow the instructions in this article.

First, you must realize that by default, WordPress does not create a home page as we are used to seeing it. It adds an updated site feed instead of the main one.

This is not a static section - but a “living”, constantly changing piece of the site, which cannot even be called “main”. Many bloggers put up with such absurdity standard settings, and leave them untouched. But what if you don’t have a blog, but an online store for smartphones or a corporate website for a real estate company? In this case, you definitely do not need a dynamic page, but a clear section of the site that changes only with your permission.

How to Make a Static WordPress Home Page

To begin with, you must clearly distinguish between the concepts of posts and pages. The first are posts, the second are pages. When you create new post it is automatically displayed on the main-page (on the main page). Thus, if you don’t change anything, a user who visits your resource (its central page) will see the latest entries. If your articles have some kind of connection, and it makes no sense to read the latest entries without reading the first ones, then the new visitor will quickly leave your portal. You need to make the platform as clear as possible so that the user understands in a split second what you want to convey to him. But you can’t do this without a static page.

To create a central site page, you need to go to the Wordrepss admin panel. Log in by logging into your webmaster account. Now you have the right to change sections of the site. To do this, find the “Pages” item (it is located on the left side of the “admin panel”). Next, find the “Add New” button. It is important to set the correct name for the main site. Usually it is called Home. It’s better for you to call it that too. Although you can write in Russian - “Main”.

WordPress home page: how to make it static and how to fill it

Don't touch the "Content" section for now. You can now click “Publish”. Now the Home page has appeared in the list of other resource pages. Unlike other sections of the portal, the main section should not contain comments. This will not benefit the indexing of the resource, and your site will quickly be spammed with low-quality links. Therefore, immediately disable commenting. You can do this in the “Edit Page” section - uncheck the box next to “Allow comments”. And also in the screen settings, remove the “Comments” item so that they are not displayed at all.

Now the most important step is to make sure that the main page is static and not updated. To do this, just go to “Reading Settings” and make some adjustments. By default, WordPress sets the item “Your latest posts”, which is why the feed is displayed on the main page. Move the checkbox to “Static Page”. And don't forget to select the section that will now contain news feed your resource (for example, make the post page “Blog”, “News” or “Articles”).

All that remains is to save last changes- and you're done. It’s better to immediately set up the main page so that it displays important categories of the site in the navigation menu. This can be done in the “Appearance” section of the “Menu” subcategory - check the boxes required categories resource, and click “Add to Menu”.

But our tasks did not end there. You now have a home page. It's static. It will not be spammed by bots, and entries on it will not appear as a feed. We've been working on this. But how now to fill out this central section of the site? Using standard WordPress features, you will not be able to create an attractive section of the site. All you can do is add a post with different fonts, headings and a couple of pictures. But this is not enough to keep a visitor on a resource - the requirements for sites have increased.

Plugins for creating stunning home pages

Now, in order to interest the user, you need to not just leave text about the section, but use all the techniques for creating landing page. Below are 4 plugins that allow you to turn the Home section into a real one-page sales page.

Impact Page Builder Plugin

This is a relatively new plugin that is not yet so popular among webmasters. However, it allows you to customize almost any template to suit your needs. For the least flexible topics, the tool gives greater flexibility in the design of the target section. The module allows you to turn a non-unique free template into a unique page. Works with all versions of the WordPress engine.

The Impact Page Builder Plugin is available for a fee. It is taught in English, so beginners may find the tool difficult. But even if you can’t figure it out, the developers guarantee a money back if there are no sales. On the other hand, if you give the tool to a professional, he can easily use it to create a design of any complexity.

This plugin is completely different from the previous one. It also has a qualitative effect on the influx of visitors to the site, but with it you will not be able to create a colorful page. This module is necessary for your home page to be indexed correctly. The plugin allows you to add keywords to the website. Please note that some difficulties may arise during installation of the add-on. Some people get a 404 error. To prevent this from happening, clear your browser cache before installing.

SpeedPPC WordPress DKI Plugin works with dynamic and static PHP pages. The module allows you to integrate entire lists of keywords taken from the Keyword Planner into your website.

OptimizePress 2.0

Previously, the OptimizePress module was an ordinary theme for Worpdress. Now the developers have made it a fast and effective tool for generating a landing page on the main site. After installation, you can literally create your own landing page in the Home section in just 3 minutes. Despite the great popularity of the add-on among foreign webmasters, it is not in such demand on the RuNet. The plugin costs about $100. Buy it only if you are serious and want to create a powerful homepage. Included with OptimizePress 2.0 you will get a lot of ready-made templates with built-in blogs, and the ability not only to make the main one, but also to arrange other sections of the resource.

Launchpad is another one good plugin, which is suitable for online stores. As you know, to increase sales, you need to add an urgency factor. Launchpad allows you to make a timer right on your home page that will automatically restart if you forget about it. The module works with any version of the WordPress engine and is easy to configure. In addition to the timer, you can use the Launchpad add-on to customize the appearance of the Home section.

Conclusion

Now you can easily create a static home page that does not display posts from your feed. And with the help of these plugins you can quickly turn Home section into a sales tool and attracting new visitors. Remember that the main one is the face of your entire resource. Failures and growth of regular users largely depend on it.