Archived topic
Align center 404 page text and add text to a button
5 replies · Started by Rostyslav on April 23, 2021
Hello,
How can I center align the h1 text on 404 page and add text in the button like in this image?:https://ibb.co/qNsjnmT
Thanks!
Hi there,
Try this CSS:
.error404 h1.entry-title {
text-align: center;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
and this PHP:
add_filter( 'generate_search_button','generate_custom_search_button' );
function generate_custom_search_button()
{
return 'Search';
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Hello again,
I could align the text but the button doesn't work. I pasted the second code on my punctions.php of my child theme.
Try this CSS instead:
.error404 .search-submit:before {
content: "Search";
}
.error404 .search-submit .gp-icon {
display: none;
}
Bingo!
Thanks!
No problem :)