Create an archive page

Table of contents
Archive pages are essential elements in a website. But how to create them with Elementor and/or Wordpress. Wordpress having its limits, it was time to install what will be my first plugin, except Elementor, CPT UI

Introduction

In the logical order of steps, according to the established page map, it was time to tackle with an archive page. According to the definition of WordPress, archive pages allow you to list all or part of the content of your site. WordPress was originally designed for blogging, it only offers one type of posts, the posts. Elementor, on the other hand, allows you to create as many archive templates as you need. My intention being to create three types of posts (travel in red, bike tracks in green and computer in blue), the study and understanding of this system started by creating a simple archive page for the posts. Then, crescendo, until the end of three archive pages for each type of custom posts.

The posts type archive

Let’s start from the beginning, let’s build an archive page for the posts and try to assign it an entry in the menu.

The approach is quite simple :

  • Create a blank page that you name “posts”.
  • Create a post and name it whatever you want.
  • Go to Settings – Reading, and assign your blank page as a post page.
  • Go to the Elementor theme builder, Archives tab, and create an archive page.
  • Also name it “posts”. This is very important, the two names must match.
  • Drag and drop the Archives widget.
The archive widget
  • Save. In the display conditions, select Posts Archive.
Display conditions in Elementor
  • Go to the header and create a “Posts” menu, to which you assign the URL “/posts”. This is a relative notation that corresponds to the absolute URL “https://www.fuyens.ch/posts”.
Relative URL link

Now you can test it. From your home page, click on the “Posts” menu and your archive page appears. The first and simplest step worked perfectly.

The custom types

But let’s go back to my page map below. WordPress, in its basic version, does not offer the possibility to create the three types of content (red, green and blue).

The page map

By researching different sources of information, two solutions emerged. One was the CPT UI plugin and the other was to insert lines of code to create the different categories. I chose the easy way to add the plugin.

CPT UI

To create a custom publication type, the process is quite simple :

  • In the “Post type slug” field, enter the name of your type.
  • In the field “Plural label”, enter the name of your type in plural.
  • In the field “Label for singular”, enter the name of your type in singular.
  • Further down, in the settings, change the “Archived” option to “True”.
  • For the menu icon, select an icon from the Dash icons library. For example, to display music notes, enter “dashicons-format-audio”.
  • In the Supports, check the fields you want to appear in the post page. The “Title” and “Editor” options are essential. In this website, “Comments and Author” have been added.

If you are correct, the new types appear in your WordPress console.

The different types of publications

One archive page for each type

Creating archive pages with Elementor is the same as creating the posts page, with one exception, there is no need to create a blank page for the custom type.

  • Create a custom type content, like for the posts type, but in the new section.
  • Create an archive template with Elementor, but this time set the display conditions for the custom type.
  • Create or adapt the menu by modifying the URL with “/name_of_your_type”.

The next step in my website will be the definition of each custom type. Indeed, it is not useful to create different types of posts, if not to add additional information in data fields related to the type.

Follow the guide in the next chapter entitled Creating Custom Fields.

Table of contents
Also to be consulted

Creating custom fields

Multilingual website

Running Javascript in WordPress

Customize the skin of an archive

The plugins used on Fuyens.ch

Map of the pages

Generate a SQL query on WordPress

Why would you create a sitemap

Homepage

Header and menus

Also to be consulted

WP Query with Elementor

The child theme and the global settings

Design of the website

Map of the pages

Registration

To register, please fill in the fields below

Forgot your password ?

You will receive a message with a link allowing you to renew your password

Password update

Please enter your old password
as well as a new one and confirm it

Login