List Places that has special field

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 8 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #53299

    nott80
    Free User
    Post count: 2

    At the moment, you can list specifically places that has Special Offer. Say i were to add a new custom field named Job Offer, how do i display only places that have that field filled in?

    Can i do it from the widget as well?

    Thanks in advance

    #53345

    Paolo
    Site Admin
    Post count: 31206

    HI,

    no that is not possible. Custom fields cannot be used in widgets like that. The only way would be to rename Special Offer to Job Offer.

    Thanks

    #53399

    nott80
    Free User
    Post count: 2

    Hi Paolo,

    The idea is to have Special Offer and Job Offer for Places and then display it separately in homepage. It may not have to be using widget. I know how wordpress hooks and filter work so perhaps you can point me any geodirectory hooks to display info for custom field.

    Thanks

    #53466

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I don’t think there is hook to add a custom sorting for the popular post widget.

    The quick and dirty solution that comes to my mind would be to copy the widget class from geodirectory-widgets/geodirectory_popular_widget.php line 127 and paste it in your theme functions.php file.

    Rename the class (class name, function and constructor) and extend it to create an update proof customized widget, then register the new widget.

    You could also unregister the orginal widget to avoid having 2 of them.

    Unfortunately I’m not the most qualified to suggest this kind of customizations, so I’ll ask to Stiofan to suggest any alternative solution.

    Thanks for your patience,

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

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

Open Support Ticket