Chad Stembridge
asked 5 years ago

What’s the best way to duplicate a widget block on Simplex? Example: I’m wanting to have more than one section Services block on the home page (which is Sidebar 3 under Widgets).

1 Answers
DominicStaff
answered 5 years ago

Hi,
If you want to Duplicate Widget Blocks, you can do as the following:

  1. Open the functions.php file in the folder path "themesdw-simplex". Find/add the following code under line 214.
    register_sidebar( array(
    'name' => __( 'Sidebar Test (Services2)', 'dw-simplex' ),
    'id' => 'sidebar-8',
    'before_widget' => '<aside id="%1$s" class="widget span3 %2$s">',
    'after_widget' => "</aside>",
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
  2. Duplicate the services.php file in the folder path "wp-contentthemesdw-simplexblocks". Then reaname the services – Copy.php file (services2.php).
    See the screenshot: http://prntscr.com/6knt4t
  3. Open the services2.php file then find the line 12 and change the ID:
    <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
    Eg: In the code added in the functions.php file, Using the 'id' => 'sidebar-8',
    After changing: <?php if ( ! dynamic_sidebar( 'sidebar-8' ) ) : ?>
    Hope this helps!
Powered by DW Question & Answer Pro