[Resolved] Sidebar appearing despite No Sidebar setting

Home Forums Support [Resolved] Sidebar appearing despite No Sidebar setting

Home Forums Support Sidebar appearing despite No Sidebar setting

  • This topic has 6 replies, 2 voices, and was last updated 2 months ago by Leo.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2242636
    Scott Pringle

    I have a page where all content is rendered from an element. The page setting was default with a sidebar. When I override the default for no sidebar it still appears but below the content from the element.

    What is happening to make the sidebar still appear and how can I correct this.

    https://dexotexmarine.com/military-specifications-resutls?id=875

    Thank, Scott

    #2242773
    Leo
    Staff
    Customer Support

    Hi there,

    This is a strange one. Are you overwriting the sidebar setting using the layout metabox?
    https://docs.generatepress.com/article/layout-metabox-overview/

    Does this happen to all pages that you try to do this?

    #2242809
    Scott Pringle

    I did try making a layout element for this page to see if it would override things but that had no effect.

    Other pages work as expected.

    What makes this one page in question different is that I am using a hook element to write PHP code. I will take my code and see if I can verify it does not have any open HTML tags. Or maybe I can try to do an HTML validator on the entire page.

    Those are the only ideas that I have.

    #2242856
    Scott Pringle

    So far no luck. I am using the grid classes in my element (grid-50 tablet-grid-50 mobile-grid-100). I assume this would be OK as long and the HTML was valid, no syntax error.

    I think I will try rewrite my page by placing the PHP into some blocks rather than doing it all in a hook element. It could be a better way to go anyhow.

    #2242882
    Leo
    Staff
    Customer Support

    As far as I understand, PHP should be turned into a shortcode:
    https://docs.generatepress.com/article/creating-a-shortcode/

    #2246277
    Scott Pringle

    Quick update.

    The problem was in my code, somewhere in the wp_query loop. I just slowly rewrote it until I could identify the problem error and then redo that section with some standard generic code. Once that worked I could reinsert the data I wanted to display.

    No need for the PHP shortcode plugin. It was just the same as using a hook element.

    Thanks for helping out.

    #2246310
    Leo
    Staff
    Customer Support
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.