Help…maybe?
This topic contains 18 replies, has 5 voices, and was last updated by Jeff 8 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 18, 2016 at 7:08 am #69149
Hello team! I’m not sure if you’d be willing to help with this but I would greatly appreciate it. I have just purchased the GD Business Hours plugin(http://jeffrose.themetailors.com/tt/portfolio/gd-business-hours/) and it allows more specific business times to be listed. However it shows up in a separate widget. Is there a way that I can get the text from the business listing widget to actually replace the default hours text from the GD theme?
Thank you.
January 18, 2016 at 8:27 am #69155De-activate the GD Time custom field, will that not fix your issue?
Where are you using the GD Time field?
URLs of relevant pages always helps us understand.January 18, 2016 at 9:48 am #69163Oh, I guess I could de-activate the time field but it still separates the time listing in another widget which isn’t ideal. That’s why I would like to have the GD Business Hours text to replace the default hours text. Here is their demo, and you can see how it works. I currently have an error on my site so I can’t even see the widget right now, but since I can see the demo, I know how it will be displayed on my site once I correct the issue.
January 18, 2016 at 11:27 am #69172What I meant is this: where on your detail page are you using the time field and where would you like the business hours to show. Business hours is not a widget.
You should really ask Jeff at http://jeffrose.themetailors.com/tt/portfolio/gd-business-hours/ if you want to move it somewhere else on your detail page.
January 18, 2016 at 4:23 pm #69219I’ve replied to Joy’s email too, but I want to comment here.
Deactivating the field seems like a good idea and will work better than my suggestion of keeping it blank.
As to including Business Hours in the regular section, I don’t see a filter in the code where it would need to be in order to replace it.
Guust: Business Hours can be used as either a widget or not, in which case it will append to the details block.
January 18, 2016 at 9:55 pm #69258Thank you @guust I have contacted @jeff as well and he did respond via email but still no progress.
Basically the Business Hours plugin should ideally replace the business hours within the listing page rather than show up as a separate widget. I was hoping that this could be done, but if not the theme sort of looses a valuable add-on provided by Jeff, having the ability to input specific hours should really be a core function.
January 18, 2016 at 10:04 pm #69259Hi,
I’ve asked to Stiofan if it is possible to add a hook for Jeff, so that his add-on can out put the business hours replacing the original field.
We’ll let you know asap.
Thanks
January 18, 2016 at 10:08 pm #69261Hi @paolo, thanks so much. This would be a great addition to Jeff’s add-on!
January 19, 2016 at 11:54 am #69297Hi Jeff,
There are a number of different ways this can be done, the default timing fields hooks will only fire if it has a value, so it could be replaced only if it had a value, You could use this filter ‘geodir_filter_geodir_post_custom_fields’ to give it a value even if it does not have one, or you could use that filter to add a brand new field on the fly in any position you want or you could simply use the address hooks to add it after the address.
Then you have these 3 hooks you can use:
/** * Called before a custom fields is output on the frontend. * * @since 1.0.0 * @param string $html_var The HTML variable name for the field. */ do_action("geodir_before_show_{$html_var}"); /** * Filter custom field output. * * @since 1.0.0 * * @param string $html_var The HTML variable name for the field. * @param string $html Custom field unfiltered HTML. * @param array $variables_array Custom field variables array. */ if ($html) echo apply_filters("geodir_show_{$html_var}", $html, $variables_array); /** * Called after a custom fields is output on the frontend. * * @since 1.0.0 * @param string $html_var The HTML variable name for the field. */ do_action("geodir_after_show_{$html_var}");
It would be great if you could use the below filter to add the business hours to our schema output also:
/** * Allow the schema JSON-LD info to be filtered. * * @since 1.5.4 * @param array $schema The array of schema data to be filtered. */ $schema = apply_filters('geodir_details_schema', $schema);
If you have any questions feel free to ping me on skype.
Thanks,
Stiofan
January 19, 2016 at 3:55 pm #69341Thanks Stiofan.
I was looking for a way to remove/insert into the custom field array, but I think this will work. I’ll test it today.
January 21, 2016 at 9:38 am #69688January 21, 2016 at 8:34 pm #69829I’m still playing with it. Since the layout needs a bit of change, I have to make sure not to break anything else, but it should work.
January 21, 2016 at 8:39 pm #69832Cool, I can’t wait. Thank you for taking the extra time to work this out.
January 22, 2016 at 7:48 pm #70105Hello again @jeffrose, I just installed the updated version but I don’t see that your add-on is replacing the default listing layout for the business hours. Were you unable to make it work with the hooks or are you still working on it? Thank you.
Also the demo for your vouchers add-on isn’t working and I would like to see how it functions before I purchase.
January 22, 2016 at 8:08 pm #70108Hi Joy:
There hasn’t been an updated version out to fix this issue yet. It would be noted in the changes.
My Voucher plugin has a new home for testing: http://geodirectory.gt-vouchers.com/
You can test the outside stuff there, or you can create your own temporary site from the sidebar and test Admin.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket