Modify Widget GD Recent Reviews

This topic contains 7 replies, has 3 voices, and was last updated by  Stiofan O’Connor 7 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #399672

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi there
    I love the widget “GD Recent reviews” but if using it for event reviews, some additional information like the event date and for example the location (city) would really be welcomed. If there are many events (many have the same title), users have no chance to know for which event the review is.

    Would this be an idea for a future release? Or could you please give me a hint how I could modify the widget?

    Many thanks and best regards
    Jorge

    #399811

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Jorge,

    If its a recurring event then the reviews are for all the events, they share the same parent ID.
    If you wish to edit any widget you just have to copy its code to your child theme and rename it.

    Thanks,

    Stiofan

    #399832

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi Stiofan
    Thanks for your feedback.
    And where do I find its Code?
    Thanks and best regards
    Jorge

    #399844

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    #399881

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi Stiofan
    Thanks for your feedback and sorry to bother you again but I have some troubles to copy the code to my child theme (I don’t know where to save it).

    I have found the code on my site:
    wp-content/plugins/geodirectory/geodirectory-widgets/geodirectory_reviews_widget.php

    I thought I have to copy it to following path:
    wp-content/themes/child-theme/geodirectory/geodirectory-widgets/geodirectory_review_widget.php

    …but nothing changes. Do I also have to change some other settings or is the path wrong?

    Thanks again for your help!

    Best regards
    Jorge

    #399884

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you need to copy the code only in either functions.php of your child theme or in a snippet using this plugin.

    After renaming class/functions and modifying the code as you wish, you’ll need to register your new modified widget. https://codex.wordpress.org/Function_Reference/register_widget

    Thanks

    #399994

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi Paolo
    Thanks for your feedback. I thought it would be easier to make some modifications 🙂
    I have installed the code snippet plugin and pasted and activated the code provided by Stiofan.
    Then I have tried to change the class/functions but I’m not sure which names I have to change. I get following error message:

    Fatal error: Call to a member function register() on null in /home/jorgedae/www/petevents.ch/wp-includes/widgets.php on line 113

    Would it be possible to let me know which rows on this code I have to rename before activating the code snippet?

    About registering the modified widget: Do I have to copy this code: https://codex.wordpress.org/Function_Reference/register_widget
    to the functions.php located in my child theme?

    Thanks again for your support!

    Best regards
    Jorge

    #400001

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Jorge,

    If you can’t manager moving the widget i would suggest you get some help with your customisation, you might break something.

    Thanks,

    Stiofan

Viewing 8 posts - 1 through 8 (of 8 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