Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] disable / unhook div#page without using CSS on front page

Home Forums Support [Resolved] disable / unhook div#page without using CSS on front page

Home Forums Support disable / unhook div#page without using CSS on front page

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

    Can you please recommend a function to unhook / disable the page content from the home page (or a specific page)?

    .page-id-2 div#page {
    	display: none;
    }
    

    I’m using a full screen full width vertical center content page header. Everything is jammed into that header content so I don’t need any of the page / post content to display.

    1) Edit Page
    2) Scroll down to Layout -> Disable Elements
    3) I would have thought, under Content Title, there would be Content Page?

    There is a chunk of blankness (produced by the padding or margin) even though page content is empty. This creates a web browser scrollbar.

    blank chunk of empty bg from padding

    Maybe I’m not using GP correctly but I don’t think if I use a page header, the div#page should show if post (or page) content is empty.

    GeneratePress 2.0.1
    GP Premium 1.5.6
    #457533
    Tom
    Lead Developer
    Lead Developer

    You can set the Page Builder Container metabox to contained or full width and it will remove that padding.

    To actually remove the #page element, you would need to create a custom page template for that specific page.

    Let me know if you need more info ๐Ÿ™‚

    #457726
    Webmaster

    Thanks for the tip.

    I thought it was gonna be as easy as duping a page but it looks like I’ll need to:

    – create custom header.php (customize line #53)
    – create child theme page template
    – create custom footer.php (line #14)

    What a funky GP structure, to have the actual #page in the header.php seems odd. If by any chance, you have a zip file – please send it over at whatever time best suits you. I’d be most grateful, if not, thanks again.

    #457965
    Tom
    Lead Developer
    Lead Developer

    Ah yea, that structure was inherited from underscores, which is what the theme was based on.

    It’s likely easier to just hide the #page element if it’s not needed – it won’t hurt anything, and will take a lot less customizing.

    #457984
    Webmaster

    Agreed.

    Good day to you Mr. Tom.

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