Script code for element

This topic contains 9 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #508378

    Sylwester
    Expired Member
    Post count: 17

    How Can I add script code for <head> element in Theme Supreme Directory ?

    #508380

    Sylwester
    Expired Member
    Post count: 17

    Some of my facilities use online booking systems. I would like to put an online booking button for these facilities. I need to put this code in the <head> section:

    <script type=”text/javascript”>
    idosellbooking_affiliate_id = 108;
    idosellbooking_affiliate_colorschema_id = 1;
    </script>
    <script src=”https://bookingpartner.idosell.com/js/iai-booking-system-widget.js”></script>

    then the button code anywhere, preferably as indicated in the attachments.

    code button:
    <button class=”widget_start” type=”button” data-client-id=”6358″ onclick=”generateWidgetIdoSellBookingPartner(this)”>Book online</button>

    #508383

    Sylwester
    Expired Member
    Post count: 17
    #508439

    Alex Rollin
    Moderator
    Post count: 27815

    You will need a 3rd party plugin to that. You could edit the theme files but we don’t recommend changing the theme files directly because they will be overwritten during an update.

    #508561

    Sylwester
    Expired Member
    Post count: 17

    1. What other plugin do you suggest, I don’t know any
    2. How to insert a button into the Places Card can be seen in the attachments button1 and button2?

    #508610

    Alex Rollin
    Moderator
    Post count: 27815

    Add the button to the Archive item and GD Details page templates
    https://wpgeodirectory.com/docs-v2/templates/details/
    https://wpgeodirectory.com/docs-v2/templates/archive-item/

    Go to wordpress.org and select ‘plugins’ from the menu and search for ‘header script’

    #508901

    Sylwester
    Expired Member
    Post count: 17

    I can’t handle it,
    I gave the HTML code in the Places settings, but it doesn’t work,

    I can’t set a short code field on Archive pages because it will be different on each object

    see new 3 attachments

    https://nocowanienajurze.pl/miejsca/hotel-jurajski-krysztal/

    #508930

    Alex Rollin
    Moderator
    Post count: 27815

    Do you make a new shortcode for each place, then?

    #509069

    Sylwester
    Expired Member
    Post count: 17

    Yes, each place is a unique code

    #509137

    Alex Rollin
    Moderator
    Post count: 27815

    Then you can add a custom field. If you make a textarea type field, you can use the advanced options to enable media embed, which will turn on shortcodes for the field.

    https://wpgeodirectory.com/docs-v2/places/custom/

    Then use GD Post Meta in a widget to show the field on the details page in the sidebar.

    If you use the Admin only option then only you as the site admin will be able to edit the contents of the field for each listing.

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

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

Open Support Ticket