Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #361445
    darcythe2nd
    Participant

    I need to add a bunch of code to the <head> of my page but need some clarification on how to do this. I need to add these lines:

    <script type=”text/javascript” src=”http://www.bccls.org/js/jquery-1.7.2.min.js”></script>

    <script type=”text/javascript” src=”http://www.bccls.org/js/searchPolaris.js?v=2″></script>

    <link rel=”stylesheet” type=”text/css” href=”eventListWidget.css” />

    <script type=”text/javascript” src=”http://www.bccls.org/js/jquery-1.9.0.min.js”></script

    <script type=”text/javascript” src=”http://www.bccls.org/js/jquery-ui-1.9.2.js”></script

    <link rel=”stylesheet” type=”text/css” href=”TinyCalAssets/tinyCal.css” media=”screen” />

    How and where should I write these? Thank you.

    #361549
    Nabeel A
    Moderator

    Hi again,

    Just replied to you here https://community.theme.co//forums/topic/add-in-head/#post-361547

    Thanks!

    #362565
    darcythe2nd
    Participant

    Ok I added all the scripts following your template. But what about the the links to the css files?

    #362569
    darcythe2nd
    Participant

    I should add: it worked! However….I noticed that now the fixed navigation bar I had on top is no longer fixed. Something in the code messed with that. How can I fix that?

    #362632
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #362813
    darcythe2nd
    Participant

    it’s currently located at bogotapubliclibrary.flywheelsites.com

    #362945
    Rupok
    Member

    Hi there,

    It seems your codes are creating conflict with that. Please check your scripts that you have added through Child Theme. I am not sure why you are doing this. You have added –

    jquery-1.7.2.min.js
    jquery-1.9.0.min.js

    But jQuery is already added by the theme, you don’t need to add it again. Also why you are using same jQuery in two different version?

    Please remove those script to get expected behavior.

    Thanks

    #362960
    darcythe2nd
    Participant

    I removed them, but in doing so the search catalog does not work. I followed instructions from our library consortium’s guidelines for integrating a search bar that can search the library catalog system here: http://staff.bccls.org/support/code_snippets_links/catalog_search.php

    I have to use the 1.7.2 jquery for it to work. The 1.9.0 jquery is also required to get the library events calendar to work on the site: http://staff.bccls.org/support/code_snippets_links/evanced_calendar_tinycal_widget.php

    Is there something I can change elsewhere that will enable all this to work but not interfere with the theme behavior? I have to have the catalog search and events calendar widget work on this site.

    #363018
    Paul R
    Moderator

    Hi,

    It sounds like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Thank you for your understanding.

    #363499
    darcythe2nd
    Participant

    Very well,
    I’ll contact them for further assistance. Thank you for your help. If I may ask for one more thing, can you please show me how to include the the css references:

    <link rel=”stylesheet” type=”text/css” href=”eventListWidget.css” />
    <link rel=”stylesheet” type=”text/css” href=”TinyCalAssets/tinyCal.css” media=”screen” />

    Thanks!

    #363502
    darcythe2nd
    Participant

    Also—what version of jQuery is the theme using natively? So I can reference that when I ask the third party developer…

    #363588
    Thai
    Moderator

    Hi There,

    Also—what version of jQuery is the theme using natively? So I can reference that when I ask the third party developer…

    jQuery v1.11.2

    Very well,
    I’ll contact them for further assistance. Thank you for your help. If I may ask for one more thing, can you please show me how to include the the css references:

    <link rel=”stylesheet” type=”text/css” href=”eventListWidget.css” />
    <link rel=”stylesheet” type=”text/css” href=”TinyCalAssets/tinyCal.css” media=”screen” />

    Thanks!

    You should copy these files to child theme folder, after that edit a bit in the previous code above:

    <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/eventListWidget.css" />
    <link rel="stylesheet" type="text/css" href="?php echo get_stylesheet_directory_uri(); ?>/TinyCalAssets/tinyCal.css" media="screen" />

    Hope it helps.

  • <script> jQuery(function($){ $("#no-reply-361445 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>