Widget

This topic contains 4 replies, has 3 voices, and was last updated by  Stiofan O’Connor 5 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #465173

    Marcel Warenburg
    Expired Member
    Post count: 24

    Hello,

    I would like to know how to customise a widget. I found that you need to unregister the widget first but how do I do that?

    #465179

    Marcel Warenburg
    Expired Member
    Post count: 24

    I found it myself:

    function remove_gdcats_widget() {
    unregister_widget(‘geodir_cpt_categories_widget’);
    }

    add_action( ‘widgets_init’, ‘remove_gdcats_widget’ );

    #465183

    Marcel Warenburg
    Expired Member
    Post count: 24

    However I encounter this problem when I try to save the code in a code snippet:

    Cannot redeclare geodir_cpt_categories_output() (previously declared . . . .

    What can I do about that?

    #465218

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    a developer has been alerted.

    They’ll follow up with you as soon as possible.

    Thank you

    #465238

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    There is no need to unregister the main widget, you can simply copy it and change the function names and the widget name and then customise that.

    Stiofan

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount