• Resolved dianat

    (@dianat)


    I need to move the right sidebar to the left. I’ve tried:

    1) Changing the class from right to left by adding the following to the child theme’s functions.php:

    /**
    * Layout classes
    * Adds ‘right-sidebar’ and ‘left-sidebar’ classes to the body tag
    * @param array $classes current body classes
    * @return string[] modified body classes
    * @since 1.0.0
    */
    function storefront_layout_class( $classes ) {
    $layout = get_theme_mod( ‘storefront_layout’ );

    if ( ” == $layout ) {
    $layout = ‘left’;
    }

    $classes[] = $layout . ‘-sidebar’;

    return $classes;
    }

    Result:
    Fatal error: Cannot redeclare storefront_layout_class() (previously declared in /foo/functions.php:35) in /foo/functions.php on line 101

    2) Removing and re-adding storefront_sidebar in child theme’s functions.php, along with above code. I tried adding to 0, 10, and 20 in turn. Each produced the same results.

    Result: same error as above

    What’s the proper way to accomplish this task?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Move sidebar from right to left’ is closed to new replies.