- This topic has 11 replies, 2 voices, and was last updated 3 years, 3 months ago by
Ying.
-
AuthorPosts
-
January 3, 2023 at 10:36 am #2482511
Arnaud
Hello
I created a personalized 404 page, but I would like to be able to edit the Page Title, the meta-title and the meta-description.
Note :
– I had 404 block element with the Element Type : Content Template
– I added the 404.php to my child theme : https://github.com/tomusborne/generatepress/blob/master/404.phpSite: https://deforges.fr/dede
January 3, 2023 at 12:06 pm #2482598Ying
StaffCustomer SupportHi Arnaud,
As you are using an SEO plugin, they usually offer the option to edit the 404 title and meta data.
https://rankmath.com/kb/titles-and-meta/– I added the 404.php to my child theme :
Don’t think this is required, as the content template is doing the same thing.
January 3, 2023 at 12:37 pm #2482635Arnaud
I added the 404.php to my child theme by following this thread : https://generatepress.com/forums/topic/creating-a-customized-404-page/
I was able to change the meta-title with RankMath plugin.
Also how can I give a specific page title for my 404 ?
thx.
January 3, 2023 at 3:14 pm #2482779Ying
StaffCustomer SupportI added the 404.php to my child theme by following this thread :
That’s for users who don’t use block elements, as you are already using a
block element - content template, this PHP method is not required.what do you mean by a specific page title?
do you mean the
<title>element in the<head>?
https://www.screencast.com/t/Aogp1fEv8emVJanuary 4, 2023 at 9:18 am #2483687Arnaud
thx Ying.
how does the method with the 404.php added to my child theme work ?
Ideally, i would like to create a Page with a 404 Template. can ?
About the other way that I implemented so far (404 block element with the Element Type : Content Template) –
what do you mean by a specific page title? > I mean the h1/page title we give when creating a new Page, different from the <title> element in the <head> which is the meta-title.Hope it’s clearer now.
thx
January 4, 2023 at 11:08 am #2483804Ying
StaffCustomer SupportIdeally, i would like to create a Page with a 404 Template. can ?
Do you mean a static page? But why would you want to do that?
I mean the h1/page title we give when creating a new Page,
That’s what I was confused about, as you’ve already added an
h1in your content template which is404, you can change it to anything you want.
https://www.screencast.com/t/bsFuAFDGDJanuary 5, 2023 at 8:18 am #2484866Arnaud
to answer your question (Do you mean a static page? But why would you want to do that?) : to have more control to style this page.
for example, i would like to style the h1 bock in the same manner as the other regular Pages : https://deforges.fr/salon/ with a hero banner that is full width.
thx
January 5, 2023 at 11:21 am #2485033Ying
StaffCustomer Supporti would like to style the h1 bock in the same manner as the other regular Pages
It can be easily done using a
block element - page hero.
https://docs.generatepress.com/article/block-element-page-hero/January 5, 2023 at 11:34 am #2485043Arnaud
i did one with a dynamic text type as Title ; but when applying it to my 404 Template. No title is set.
any solution ?
January 5, 2023 at 11:45 am #2485050Ying
StaffCustomer SupportYou don’t need to use a dynamic title, you can use a static title.
January 5, 2023 at 12:12 pm #2485076Arnaud
thx got it
there is big white space between the last paragraph “Le lien que vous avez suivi peut être incorrect ou la page peut avoir été supprimée.” and the next block on a grey block.
how can we control this white space ?
thx
January 5, 2023 at 12:51 pm #2485106Ying
StaffCustomer SupportBecause you have this CSS added to your site:
#main { min-height: 65vh; }Change it to:
body:not(.error404) #main { min-height: 65vh; } -
AuthorPosts
- You must be logged in to reply to this topic.