Product categories widget

This topic contains 4 reply and 2 voices, and was last updated by wei shen 8 years, 7 months ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
September 5, 2015 at 12:55 pm 70529
wei shen Hi, Is it possible to replace the default product categories widget at the left side of the main page to a customized widget? Thanks
September 6, 2015 at 5:11 pm 70666
towhid towhid

Hello Shen,

I did not understand your question clearly. Can you please make the question clearer. What you exactly want to do with the customize widget?

Thanks

September 6, 2015 at 8:36 pm 70713
wei shen wei shen

Sorry, I didn’t describe my question clearly. In the main page, at the left hand of sliders, we have product categories list. For example I want to replace this one by another widget. What should I do?
In addition, could you give some hint about how to customize the components in this section. Because I can change the widget in header sdiebar or home sidebar, but I found no way to change in this part.

Thank you for your help.

September 9, 2015 at 12:41 pm 71087
towhid towhid

Hello,

Please follow these process to show a widget in the frontpage.

Step 1: Create a child theme

Step 2: Paste this code at the bottom of the child theme’s functions.php file

function frontpage_sidebar_widgets() {
    register_sidebar( array(
        'name' => __( 'Dokan Frontpage Sidebar', 'theme-slug' ),
        'id' => 'frontpage',
        'description' => __( 'Widgets in this area will be shown on Front page.', 'theme-slug' ),
        'before_title' => '<h1>',
        'after_title' => '</h1>',
    ) );
}
add_action( 'widgets_init', 'frontpage_sidebar_widgets' );

Step 3: Now navigate to themes/dokan/front-page.php. Copy the front-page.php to the child theme which is themes/dokan-child/.

Step 4: Find <?php dokan_category_widget(); ?> and replace this line <?php dynamic_sidebar( 'Dokan Frontpage Sidebar' ); ?>

Step 5: Now, you will get a sidebar in the theme like the screenshot:

Sidebar

Step 6: Now, drag a widget to the “Dokan Frontpage Sidebar” and you will get a new widget into the frontpage sidebar.

Thanks

September 13, 2015 at 6:01 pm 71639
wei shen wei shen

It’s clear. Thank you for your help Towhid.

Viewing 4 Posts - 1 through 4 (of 4 total)