Page without menu, title

Home Forums Suffice Page without menu, title

Tagged: 

This topic contains 5 replies, has 3 voices, and was last updated by  saudensabina 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1780266

    contact211
    Participant

    Hello,

    I did post a question on WordPress.org support site but not sure it will be addressed, so I post it also here.

    I would like to apply specific attributes to a landing page (which removes menus and title).

    For now I use a page ID number hosted in Custom css in a child theme.
    .page-id-10679 .site-header,
    .page-id-10679 .entry-header {
    display: none;
    }

    How to create a specific “page template” which removes header menus and title ?

    Secondly, I am using Suffice theme which comes with a “Page Builder” page template. What added feature does this “page template” provides ?

    Thanks.

    JP FOLLEGOT

    #1786935

    Rajesh
    Moderator

    Hi @contact211,

    You can take a reference on how to make a page template from the link below:
    https://developer.wordpress.org/themes/template-files-section/page-template-files/

    For removing only header title and menu, you need to include the custom-header file in your page template and after that, you need to edit the code in the custom header file you created.

    Page Builder template provides a proper layout while building a page using page builder.

    Thanks.

    #1787951

    contact211
    Participant

    Thanks,

    Your answer is by far to generic.

    My goal is not to create from scratch but just update the standard suffice page.php template script.
    Usually from achieving such one just copy the default page.php, rename it and modify it.
    But the stadard page is so soffisticated and copmlex that it is not trivial to understand.

    Would you please be more specific.

    JP FOLLEGOT

    #1793636

    Rajesh
    Moderator

    Hi, JP FOLLEGOT,

    Here is what you need to do to accomplish your requirement.

    1. Create a child theme.
    2. Copy the page.php from the main theme to the child theme and rename it to the custom template like page-custom.php

    3. Inside the page-custom.php add a template name like Custom page Template. Add ‘custom’ inside get_header to call custom header as get_header( 'custom' ); . Take a reference from the below link for Template name.
    https://developer.wordpress.org/themes/template-files-section/page-template-files/

    4. Copy the content of header.php from the main theme and paste it inside header-custom.php. After that, remove all the code that generates navigation.

    6. Similarly, for removing the title, you need to get a different content page, copy the code from parent theme content-page.php and paste it in custom-content-page.php. Remove the code containing a header from it.
    Also, replace the template name to custom-content in the get_template_part of page-custom.php. Also, remove the template-parts. It should look like get_template_part( 'custom-content', 'page' );

    5. Finally, go to the page you want to use this template and select the template you just created under Template option.

    Thanks.

    #1795589

    contact211
    Participant

    Thanks a lot,

    Perfect explanation.

    JP FOLLEGOT

    #1809223

    saudensabina
    Moderator

    Hi @contact211,

    Glad to know it worked. If you get any issue later, feel free to ask again! I hope you liked our theme. If so, you can help us by providing a review here: https://wordpress.org/support/theme/suffice/reviews/?filter=5
    Best Regards.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.