Site logo

Archived topic

How to add post title

5 replies · Started by Amit Nair on June 26, 2018

Viewing posts 1–6 of 6

Hello,

I want to add post titles in all posts. I dont want any title on pages though.

Currently only the home page with thumbnails shows the post title. Please help.

How can I do it?

Hi Leo,

I am not sure if I added that code. I dont even remember how to check it.

But I remember, I was seeing the titles even for pages which I never wanted.

Now I don't see titles for anything. I actually want titles only for posts and not pages.

Regards,

Hi Leo,

That's right. I have used the snippets plugin and inserted the below code.

add_action( 'after_setup_theme', 'tu_remove_all_titles' );
function tu_remove_all_titles() {
add_filter( 'generate_show_title', '__return_false' );
}

I had done this to remove titles from pages. But I need the titles for posts. How can we achieve this?

This archived topic is closed to new replies.