I have tried searching, and tried a few options, but I'm not able to remove the H1 / title / Underscore for specific pages.
I don't want use CSS. I would like to remove it via
functions.php or in
I'm not good in PHP, so the Codex didn't help me too much.
I need something like this:
if > page slugs / IDs > do not display H1/ title
Can anybody help? Thanks.
The way I would do this is to create a separate page template that lacks the H1 code, and then manually select that template (in the Page Attributes box on the page editor screen) for each desired page.
WordPress has the predefined function
is_page(), which looks like this:
is_page( int|string|array $page = '' )
$page parameter is specified, this function will additionally check if the query is for one of the pages specified.
false, depending on whether the query is for an existing single page.
You can find more details in the documentation.