Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript WP issue

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #147571
    gabbagabba
    Participant

    I have first created the site in HTML5 only: http://www.tomrerdahl.no/gabba

    And I have installed wordpress on this URL: http://www.tomrerdahl.no

    First of all, som of the javascripts (located in a folder “js”) won’t work. I am first of all thinking about the scroll to top icon that shows up in the bottom right corner.

    Second of all, my images doesn’t show up… Don’t get this as the css-path should be the same…

    Using last version of WP and testing in Safari 6.0.5 on my mac.

    #147637
    Senff
    Participant

    The site at http://www.tomrerdahl.no is a WordPress site…..? Did you write the templates from scratch, avoiding WordPress tags? If you just copied the header from http://www.tomrerdahl.no/gabba into header.php for example, there’s not really a point using WordPress.

    Either way, everything seems to work fine on there, images and javascripts.

    #147676
    gabbagabba
    Participant

    Just sorted it out. In a way…

    I had to use the full URL in the header.php:

    <link rel="stylesheet" href="http://www.tomrerdahl.no/wp-content/themes/TD/tdgrid.css" />
    
    <script type="text/javascript" src="http://www.tomrerdahl.no/wp-content/themes/TD/js/hiddenmenu.js"></script>
    

    But wanted to do this through calling the scripts in the functions.php and use
    <?php wp_enqueue_script() ?> in the header.php. But I didn’t make it work…

    Any ideas how to do this? I read everywhere that the scripts should not go in the header.php.

    #147681
    Senff
    Participant

    Well, you’ll need to use more WP-related tags thn just wp_enqueue_script to make it work. But you didn’t really address my previous questions so it’s difficult to help you.

    #147683
    gabbagabba
    Participant

    Sorry, yes this is a wp site. I am implementing wp tags as we speak, but I am having one page only. As you can see on tomrerdahl.no/gabba. No posts/blog. So I am using text widgets to display info and will use some wp plugins for a gallery and a contact form. But need wp for this so my client can update the content.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.