Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • RVoodoo is right, you probably got an end tag omitted and causing the whole code cascading issue.
    I would recommend you use a firefox plug in called html validator, it validates the page for you right inside firefox window, very handy

    Thread Starter hwu053

    (@hwu053)

    OK, problem resolved.
    I deleted every single file in my theme and started putting them back together.
    the problem started happening when I put my functions.php back, and it turns out the code that is causing this weird problem is

    function load_index_page() {
    
      		wp_enqueue_script('jquery-1.3.2.min', 'wp-content/themes/vono/js/jquery-1.3.2.min.js','1.3.2');
      		wp_enqueue_script('easySlider1.5', 'wp-content/themes/vono/js/easySlider1.5.js','1.5');
    		wp_enqueue_script('custom', 'wp-content/themes/vono/js/custom.js','1.0');
    
    }
    add_action('init', load_index_page );

    I could not remember why I put it there at the first place, I probably copied it from somewhere and totally forgot about it.
    After deleting this, site no longer having this issue.
    Thanks god, after 3 weeks waste of time and hundreds of dollars paid for google adwords, hopefully I can start to earn some money tomorrow.

    Thread Starter hwu053

    (@hwu053)

    I did further testing. This only happens to my own theme, when I used this theme on a different WP site on a different host, same problem happens.
    Which mean, it is not a problem with the host, nor any of the WP plugins I am using.

    I also deleted everything from my index.php and only typed in one line
    <a href="http://www.vono.co.nz/about">test</a>
    when clicking on this link, that still triggers the dial up box. But if I href it to any other site or my homepage http://www.vono.co.nz, it goes through.

    What the hell is wrong with my site~~~~~

    Thread Starter hwu053

    (@hwu053)

    Thank you both for your generous help.
    I tried putting the following code in my header.php

    <?php
    function load_index_page(){
    	wp_enqueue_script('jquery-1.3.2.min', 'wp-content/themes/vono/js/jquery-1.3.2.min.js');
        wp_enqueue_script('easySlider1.5', 'wp-content/themes/vono/js/easySlider1.5.js');
    }?>
    
    <?php if (is_home()){
    		add_action('init', load_index_page);
    } ?>
    
    <?php wp_head(); ?>

    and I’ve also tried the following code in my functins.php/

    function load_index_page() {
      if (is_home()){
      		wp_enqueue_script('easySlider1.5', 'wp-content/themes/vono/js/easySlider1.5.js');
    		wp_enqueue_script('jquery-1.3.2.min', 'wp-content/themes/vono/js/jquery-1.3.2.min.js');
      }
    }
    add_action('get_header', load_index_page );

    But neither of them loads up the codes enqueued.
    What mistake did I make in those codes?

Viewing 4 replies - 1 through 4 (of 4 total)