How to hide only the page titles?


Hey

How do I ONLY hide the page titles and not the post titles?

I tried to hide it with CSS:

.uk-article-title {
    display: none;
}

But it hid page and post titles. Then there was also a code snippet for hiding post and page. I have not yet found the code snippet to only hide page titles.

Aha! This CSS code works for just hiding page titles:

.page .uk-article-title {
    display: none;
}

Hi Paal, my solution below. You must create a page.php file. Enter this code inside it.


<?php
// Remove the page title.
beans_remove_action( 'beans_post_title' );
// Load Beans document.
beans_load_document();
?>

and place this file ( page.php ) in Your child theme.

You can read some basic rules of hierarchy of wordpress templates, to know better how to work with templates files, here.

Fabio



Fantastic! Elegant solutions. Fabio


Write a reply

Login or register to write a reply, it's free!