Remove H1 / title / Underscore - without CSS

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 content.php.

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.

Topic underscore title functions Wordpress

Category Web


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 = '' )

If the $page parameter is specified, this function will additionally check if the query is for one of the pages specified.

It returns true or false, depending on whether the query is for an existing single page.

You can find more details in the documentation.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.