Remove the title of the pages in Genesis – .com

In this tutorial we are going to see how to remove page titles in a child theme created with the Genesis Framework.

How to remove page titles in Genesis?

Whether you are using some of the many Genesis Framework child themes available, or have chosen to create your own child theme, you may have found yourself in need of remove the titles of some pages.

So, let’s see how we can eliminate the titles of all pagesand how to do it only in some specific that may interest us.

We can do this in several ways, in this case we are going to explain two options. One will be using the Genesis Extender plugin, a very interesting premium plugin that offers us the possibility of making changes easily and entering the world of code, and the other will be directly with code, which is always much more versatile because We already know that by programming we can do whatever we want. So with all that said, let’s get started!

Remove page titles using a plugin

The plugin we are going to use is called Genesis Extender. It is a premium plugin that allows you to easily extend and modify the features of any template created with Genesis.

Genesis Extender is very complete and has many options, so if you want to get to know it in depth, we recommend you take a look at , where you will learn everything you need about this plugin.

Well, then we are going to download it, and once we have the file on our computer we will proceed to install it. The steps are the same as always, we would have to go to the WordPress desktop and click on “Plugins / Add new / Upload plugin”. Next we will have to select the file and click on “Install now” to finish activating the plugin.

As soon as we install and activate it, we will see that a new menu option appears in WordPress. We must access it, specifically “Genesis Extender/Settings”, and then we will have to click on the “General Settings” tab.

See also  Course to publish a book on Amazon - .com

This will take us to the plugin configuration screen. As we can see in this tab we have several sections available, the one that interests us in this case is the one that says “Page Titles” since from it we can eliminate the title of our pages.

To remove the titles of all the pages, we only have to check the “Remove All Page Titles” box under the “Page Titles” section and save the changes. If we access our website we will see that now none of them appear.

Let’s go to the next case, suppose we want to remove only the title of some pages of our site and not all. In this case we have to look at the “Remove Specific Page Titles By IDs” field that appears just below the previous option.

To remove the title of a specific page, we have to include in that field the “ID” of our page or pages separated by commas. To help us in this task and find the identifier of each page easily, we can click on “”.

This will display a box, “Page ID Reference”, which contains the references or identifiers of each page. Once we have located the IDs that interest us, we simply have to add them to the “Remove Specific Page Titles By IDs” field.

And that’s all! As you can see, the steps to remove the titles of all the pages of our website, or of some specific pages, are super simple. Now let’s see how to do this in code.

Remove page titles using code

In the previous section we saw how to remove the titles of the pages of our site and how to do it if we only want to remove them on specific pages. In this case we are going to see how we can do the same but without using other plugins, simply with code. To achieve this we have several options as you can see in the tutorial on .

See also  Underscores course - .com

This time we are going to choose to include our code in a previously created utility plugin. First of all, we are going to see the lines that we would have to add in the event that we wanted to eliminate the titles of all the pages of our site:

//Remove the title of all pages in Genesis add_action( ‘get_header’, ‘bld_eliminar_titulos_paginas’ ); function bld_eliminar_titulos_paginas() { if ( is_page() ) { remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ ); } }

As we can see, the first thing this code does is add the custom function “bld_eliminar_titulos_paginas” in the action hook “genesis_entry_header”. With this we manage to associate said function with the header of our content. Then we define the function, and that’s where we’re going to ask if it’s a page, since in this case we’re only interested in removing their titles, not the post titles. And now yes, if it is a page we will eliminate the title of the header.

In the previous section we also saw how to remove the title of a specific page, so we are going to indicate the code that we would have to add if we wanted to do it. But before we have to carry out a previous step, find out the ID of the page that interests us, for this we can use the following trick.

The first step will be to open that page. Once we have it open in the browser, we will position ourselves over part of the article, click on the right button and click on “Inspect” or a similar option that we have available in our browser. The code inspector will then open. Within that code we will have to look for the reference to “article”.

See also  Team |

We will see that next to this HTML code, there is a custom CSS class, in our case it is called “post-2”. The number that accompanies it is precisely the identifier we are looking for, so all that remains is to add it to our PHP code:

//Remove the title of specific pages in Genesis add_action( ‘get_header’, ‘bld_eliminar_titulos_paginas’ ); function bld_eliminar_titulos_paginas() { if ( is_page( 2 ) ) { remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ ); } }

Do you see how simple? Remember here that you would have to change the identifier of the page, in this case 2, for the ID of the page from which you want to remove the title, otherwise it will not work correctly.

And that’s it, it’s that simple. With these few lines of code we will be able to eliminate the titles of all the pages or of some specific ones of our website, and the best thing is that when using Genesis this same code will work in any child theme created from the framework.

Summary and conclusion

In Genesis it is possible to remove page titles, both individually and globally, for all of them.

We can do it with plugins like Genesis Extender, as we see in , or directly using code that in this case we added to a utility plugin that we had previously created, as we can see in the .

And you already know, if you subscribe you will have access to these two courses and to the more than available at , with which you can learn about Genesis, WordPress, development and many more topics 🙂

Loading Facebook Comments ...
Loading Disqus Comments ...