Help…maybe?

This topic contains 18 replies, has 5 voices, and was last updated by  Jeff 8 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #69149

    Joy
    Buyer
    Post count: 1076

    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.

    #69155

    Guust
    Moderator
    Post count: 29970

    De-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.

    #69163

    Joy
    Buyer
    Post count: 1076

    Oh, 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.

    Demo: http://geodirectory.installedforyou.com/places/united-states/pennsylvania/philadelphia/attractions/the-liberty-bell-center/

    #69172

    Guust
    Moderator
    Post count: 29970

    What 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.

    #69219

    Jeff
    Buyer
    Post count: 188

    I’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.

    #69258

    Joy
    Buyer
    Post count: 1076

    Thank 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.

    #69259

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

    #69261

    Joy
    Buyer
    Post count: 1076

    Hi @paolo, thanks so much. This would be a great addition to Jeff’s add-on!

    #69297

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi 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

    #69341

    Jeff
    Buyer
    Post count: 188

    Thanks 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.

    #69688

    Joy
    Buyer
    Post count: 1076

    Hi @jeffrose, any luck on this? I sent you an email as well. Thanks.

    #69829

    Jeff
    Buyer
    Post count: 188

    I’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.

    #69832

    Joy
    Buyer
    Post count: 1076

    Cool, I can’t wait. Thank you for taking the extra time to work this out.

    #70105

    Joy
    Buyer
    Post count: 1076

    Hello 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.

    #70108

    Jeff
    Buyer
    Post count: 188

    Hi 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.

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