[Resolved] PHP target for Allow Sidebars with Sections

Home Forums Support [Resolved] PHP target for Allow Sidebars with Sections

Home Forums Support PHP target for Allow Sidebars with Sections

  • This topic has 1 reply, 2 voices, and was last updated 4 years ago by David.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1250824
    Yurik

    I have installed the GP premium (plus Dispatch from site library)

    I would like to add a sidebar on a specific page while using sections PHP code: add_filter( ‘generate_sections_sidebars’,’__return_true’ );

    I have installed the GP premium, if it not a Child theme, where do I have to copy-paste this PHP code? Please help and explain how to action in my situation.

    example: https://spainru.com/biznes-v-ispanii/

    Thank you!
    Yurik

    #1251116
    David
    Staff
    Customer Support

    Hi there,

    add this function to allow Sidebars to be displayed on pages with sections:

    add_filter( 'generate_sections_sidebars','__return_true' );

    Then use the Layout Metabox to display a Sidebar on that page:

    https://docs.generatepress.com/article/layout-metabox-overview/

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