Support » Plugin: Ocean Custom Sidebar » How to add custom sidebar to childtheme / partials / layout-file?

  • Avantart

    (@avantart)


    What is the code to add a custom sidebar to a layout-file?

    I get the ID of the custom sidebar, but I do not know of any shortcode, which I could add to my layout-file?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    In the layout file, you need to add below code to display the sidebar.

    <?php dynamic_sidebar( 'custom-sidebar-id' ); ?>

    Avantart

    (@avantart)

    thank you, I will try that!

    What a pity that all these necessary infos are not in the documented… you have to ask for every piece of code…

    I am happy!

    Connie

    You can also check wordpress codex for the sidebar. Let me know if that doesn’t work.

    Thank you Amit for the code to display the custom sidebar within a template layout.

    Very handy.

    You’re welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add custom sidebar to childtheme / partials / layout-file?’ is closed to new replies.