[Support request] How to add post title

Home Forums Support [Support request] How to add post title

Home Forums Support How to add post title

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #609135
    Amit Nair

    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?

    #609242
    Leo
    Staff
    Customer Support

    Hi there,

    Post title should be added by default unless you are using this snippet:
    https://docs.generatepress.com/article/generate_show_title/

    Can you double check?

    #609254
    Amit Nair

    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,

    #609270
    Leo
    Staff
    Customer Support

    If you did then I think it would’ve been one of these methods:
    https://docs.generatepress.com/article/adding-php/

    #609554
    Amit Nair

    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?

    #609703
    David
    Staff
    Customer Support

    Hi there, the simplest method would be to remove the code and use the Disable Elements meta to remove the title on your pages:

    https://docs.generatepress.com/article/disable-elements-overview/

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.