Home Forums Theme Support Dokan Product categories widget

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  wei shen 3 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #70529

    wei shen
    Member
    Post count: 13

    Hi,

    Is it possible to replace the default product categories widget at the left side of the main page to a customized widget?

    Thanks

    #70666

    towhid
    Participant
    Post count: 4505

    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

    #70713

    wei shen
    Member
    Post count: 13

    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.

    #71087

    towhid
    Participant
    Post count: 4505

    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

    #71639

    wei shen
    Member
    Post count: 13

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

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Product categories widget’ is closed to new replies.