[Support request] Show / Hide titles ( or elements) in Custom Post

Home Forums Support [Support request] Show / Hide titles ( or elements) in Custom Post

Home Forums Support Show / Hide titles ( or elements) in Custom Post

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #345541
    Jorge

    Hello
    This is my first query about GP after the purchase.
    Is there a default way for the template to hide the titles?
    This should happen for custom post created by me (with Toolset’s TYPES).
    I work with TOOLSET where I create a LAYOUT and use as a PARENT to the same Theme GP
    This Layout shows a single post where, when editing, is the option to show / hide the title.
    But I must do it post by post and there are many
    Sorry if the answer is very obvious, I’m just getting to know GP
    Thank you very much – Jorge

    #345634
    Leo
    Staff
    Customer Support

    Hi there,

    Are you referring to the disable eleemnt meta box?
    https://docs.generatepress.com/article/disable-elements-overview/

    Or an option within ToolSet?

    Are you able to link me to the page?

    #345665
    Tom
    Lead Developer
    Lead Developer

    You can remove the title when within a CPT with a function:

    add_action( 'wp', 'tu_disable_cpt_elements' );
    function tu_disable_cpt_elements() {
      if ( 'product' == get_post_type() ) {
        add_filter( 'generate_show_title', '__return_false' );
      }
    }

    product being the custom post type name.

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