Chad Stembridge
asked 9 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
answered 9 years ago

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:
  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