Home › Forums › Gutenberg › How to implement 2-column layout? › Reply To: How to implement 2-column layout?
I would suggest building your sidebar as widget. WP recently integrated Gutenberg into the widgets aswel.
To register a sidebar:
if (function_exists('register_sidebar'))
{
// Define Sidebar Widget Area
register_sidebar(array(
'name' => __('Sidebar'),
'description' => __('Sidebar voor de vervolgpagina\'s'),
'id' => 'sidebar',
'before_widget' => '<div id="%1$s" class="%2$s">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
}
Then implement this code in your sidebar area:
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar')) ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.