GeoDirectory SupportHooks needed – Custom Fields – GeoDirectory Support https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/feed Thu, 05 Mar 2026 03:23:17 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18428 <![CDATA[Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18428 Wed, 15 Oct 2014 12:49:36 +0000 boxportable I would like to request hooks to add custom fields for my directory listings.

Currently have 2 custom fields I made by editing core files and having to do these updates after each update is a pain.

Also if and when could I expect to see these hooks? Just so I know to hold off updating until that time or not.

]]>
https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18431 <![CDATA[Reply To: Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18431 Wed, 15 Oct 2014 12:58:48 +0000 boxportable also on the topic of hooks, any idea when some sort of documentation would be available on this topic (ie; list of available hooks)?

I bought this plugin several months ago now and have yet to see any progress with documentation and having to search or ask on the forums every time I want to hook something is time consuming and to be honest a little annoying.

Also just noticed the feature request bit to the right there, so this will only be implement if its in there and voted as popular? Because that kind of contradicts the bit about hooks and actions here:

]]>
https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18438 <![CDATA[Reply To: Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18438 Wed, 15 Oct 2014 14:08:10 +0000 Jeff Hey Boxportable, I just want to check in.

Why do you need hooks for custom fields? GeoDirectory offers custom field management built-in for each post type (including the default places), and will automatically add them to the forms if you set the options.

Additionally, there are functions (not hooks) that can be run one time (via a plugin or theme) to programmatically add them. I used this in my GT-Vouchers plugin.

While I agree that more hooks/filters are needed, and a list would be nice, so far I’ve found the custom fields options built in to work quite well.

]]>
https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18480 <![CDATA[Reply To: Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-18480 Wed, 15 Oct 2014 17:36:51 +0000 Paolo As Jeff said, there shouldn’t be any need for custom fields.

In any case, we would need a through description of what you need in order to create any new hooks.

Thx

]]>
https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-19194 <![CDATA[Reply To: Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-19194 Thu, 23 Oct 2014 10:46:14 +0000 boxportable Well this is all good to know perhaps if the documentation wasn’t so barren I would of known this :/ but based on what your saying its still not what I want.

The code I added is custom HTML / Javascript for opening hours and also a bit for extra listing images using the wordpress built in media browser instead of the one that comes with geodirectory as standard which seems to be just a simple browse for file popup window.

I had to add code into the following files;

– Admin_hooks_actions.php (declare the 2 fields for them to appear as drag / drop items)
– Custom_field_html.php (added them to the switch in here, needed to but nothing under them as code)
– Custom_fields_functions.php (the actual code and some script file hooks for what would render when in the add/edit listing page)

Each time I update I need to go and update all these files which is somewhat annoying.

Not sure what you mean by (again documentation isn’t very populated):
“Additionally, there are functions (not hooks) that can be run one time (via a plugin or theme) to programmatically add them. I used this in my GT-Vouchers plugin.”

]]>
https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-19233 <![CDATA[Reply To: Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-19233 Thu, 23 Oct 2014 14:21:05 +0000 Jeff For your last point, there’s a function called

geodir_custom_field_save() in custom_fields_functions that you can run on the activation hook. It will permanently save your custom fields.

The structure of it’s array can be see in geodir_create_default_fields() in admin_db_install.php

Drop me an email at jeff at jeffrose dot ca if you need some help.

I’ve said before, the hooks & filters are not everywhere I want them yet, but for the most part I haven’t had to hack core. Except for overriding a template, but that’s built in too.

]]>
https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-19420 <![CDATA[Reply To: Hooks needed – Custom Fields]]> https://wpgeodirectory.com/support/topic/hooks-needed-custom-fields/#post-19420 Fri, 24 Oct 2014 13:06:20 +0000 boxportable Ah Jeff that sounds good and something I will definitely look into thanks for the help I appreciate it.

]]>