Support Forum
hmm.. doesnt look like the change was actually made? jquery ui is still getting loaded in the header... and then when bootstrap loads in footer, it stomps on it...
away from my computer at moment and replying by email, so I cant look at the code I gave you... please make sure the change was saved and matches... I will look at it when I can get to desktop...
Visit Cruise Talk Central and Mr Papa's World
Thanks for the help.
I was wondering if perhaps the reason the change didn't take is because I am using a child theme. The file where the change was made is in a sub directory of the parent. I replicated the directory structure in the child theme and copied the file to the right location, but now I wonder if that is enough to call the file. (While I'm a fast learner, I'm not really a programmer.)
I'll make the change in the parent and select it as my theme and see if that resolves my initial problem.
I'll report back.
Ok. I just commented out the bootstrap line, and of course it solves my initial problem. I'm just not sure what else it breaks, but at least I know the change is effective within my child theme.
I'd still like a solution, as I'm not sure what trouble I just walked myself into though.
ETA: I just missed your post. But is what I essentially did what you were asking Steve?
did I do it backwards??? I want jquery-ui dependent on bootstrap... so bootstrap is loaded first...
Visit Cruise Talk Central and Mr Papa's World
no, think I have the order right... lets check couple things...
one, you replaced those three lines with the other three lines? so the order was changed, right?
second, in:
wp_enqueue_script( 'jquery-ui-core', '', array('jquery', 'bootstrap'), false, true );
just want to make sure the '' was entered as two single quotes... likely would be an error if not, but just want to be sure...
okay, then, lets try Andy's idea plus one more...
try changing:
wp_enqueue_script( 'bootstrap' ,TC_BASE_URL . 'inc/js/bootstrap.min.js' ,array( 'jquery' ),null, $in_footer = true);
to
wp_enqueue_script('bootstrap' ,TC_BASE_URL . 'inc/js/bootstrap.min.js', false, false, false);
and see if we can force it into header... if you have issues after doing that, then try
wp_enqueue_script('bootstrap' ,TC_BASE_URL . 'inc/js/bootstrap.min.js', array('jquery'), false, false);
which puts teh jquery dependency back...
Visit Cruise Talk Central and Mr Papa's World
Unfortunately, none of that worked. I checked and double checked that I followed your instructions. Tried it all a few times.
Problem remains.
So far all that seems to somewhat work is killing the library altogether. But then it breaks the mobile menus. Frustrating. Close but no cigar.
1 Guest(s)