Hi,
I’d like to hide the footer on just certain pages.
I didn’t find any page id to hide it in function.php with code like that :
add_action('wp_footer', 'hide_footer');
function hide_footer() {
if (is_page('page-id')) {
?>
<style>
.site-footer {
display: none;
}
</style>
<?php
}
}
I tried with the slug of the page and it doesn’t work.
Any help on that ?
andrii
January 2, 2024, 1:44pm
4
Hi,
Unfortunately, this is not a HivePress-specific setting, so we can’t provide more details. But the snippet looks good, I recommend adding the !important
parameter and everything should work correctly.
Hi,
I found a better and easier solution.
Hide a specific footer’s page in CSS, here in submit listing page :
.hp-template--listing-submit-page .site-footer {
display: none;
}
I used the page class displayed in the <body, found with the inspect tool.
system
Closed
February 1, 2024, 3:50pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.