• Im trying to transform the original widget category from wordpress as accordion;

    I can find the files which are: default-widgets.php and category-template.php

    HOwever my back end skills are quite low, any helps would be awesome to help me with that thank you

Viewing 1 replies (of 1 total)
  • Vee

    (@vishalgularia)

    Hi,

    You can do in the following way.

    Place the widget text in a div like

    <div class=”box-inner”>
    {widget_content}
    </div>

    Note: you can do this in register sidebar section, like this :
    ‘name’ => __( ‘Right Sidebar’, ‘vee’ ),
    ‘id’ => ‘inner-page-widget-area’,
    ‘description’ => ”,
    ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</div></div>’,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3><div class=”box-inner”>’,

    Last, include jquery ui script and add the following into footer or header script area:

    $(“.accordion .box-inner”).hide();
    $(“.accordion h3”).click(function(){
    $(this).next(“.box-inner”).slideToggle(“slow”)
    .siblings(“.box-inner:visible”).slideUp(“slow”);
    $(this).toggleClass(“active”);
    $(this).siblings(“h3”).removeClass(“active”);
    });

    Need more help, reply back please.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘transform default widget_category in accordion’ is closed to new replies.