gkhabas
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Managing js filesThank you Pioneer Web Design for the solution.
Forum: Fixing WordPress
In reply to: Managing js filesHello Andrew,
I have got almost 20 js files. When I used all 20 files my pages doesn’t load and displays the message “Database Connection Failed”. When I remove half js files then the pages load.Forum: Fixing WordPress
In reply to: Managing js filesI am sure about the issue Andrew..
Can u give me some solutions for the problem?Forum: Fixing WordPress
In reply to: Problem in linking the js fileThank you stephencottontail for your help..
Forum: Fixing WordPress
In reply to: Problem in linking the js fileHello stephencottontail,
My site is not live. I am currently running this site on local server xampp..
If you can provide me your email address or skype id then I can discuss my problem with you and I can also send my error files so you can help me…Thanks… 🙂
Forum: Fixing WordPress
In reply to: Problem in linking the js fileGuys, I am still confuse
My function.php code
function theme_js()
{
wp_enqueue_script(‘min_js’, get_template_directory_uri() . ‘/js/jquery.min.js’, array(‘jquery’), ”, true);
wp_enqueue_script(‘cycle_js’, get_template_directory_uri() . ‘/js/slider/jquery.cycle.all.js’, array(‘jquery’), ”, true);
wp_enqueue_script(‘chilli_js’, get_template_directory_uri() . ‘/js/slider/chili-1.7.pack.js’, array(‘jquery’), ”, true);
}
add_action(‘wp_enqueue_scripts’, ‘theme_js’);My original header.php code
<script type=”text/javascript” src=”js/jquery.min.js”></script>
<script type=”text/javascript” src=”js/slider/jquery.cycle.all.js”></script>
<script type=”text/javascript” src=”js/slider/chili-1.7.pack.js”></script><script type=”text/javascript”>
$(function() {
$(‘#slideshow’).cycle({ slideExpr: ‘img’ });$(‘#zoom’).cycle({
fx: ‘zoom’,
sync: false,
delay: -2000
});$(‘#slide’).cycle({
fx: ‘turnDown’,
delay: -4000
});$(‘#up’).cycle({
fx: ‘curtainX’,
sync: false,
delay: -2000
});});
</script>
When i delete the above code in header.php the js won’t work.So i modified the code in header.php and deleted the function.php code
Modified header.php code
<script type=”text/javascript” src=”<?php echo get_stylesheet_directory_uri() . ‘/js/jquery.min.js’ ?>”></script>
<script type=”text/javascript” src=”<?php echo get_stylesheet_directory_uri() . ‘/js/slider/jquery.cycle.all.js’ ?>”></script>
<script type=”text/javascript” src=”<?php echo get_stylesheet_directory_uri() .’/js/slider/chili-1.7.pack.js’ ?>”></script><script type=”text/javascript”>
$(function() {
$(‘#slideshow’).cycle({ slideExpr: ‘img’ });$(‘#zoom’).cycle({
fx: ‘zoom’,
sync: false,
delay: -2000
});$(‘#slide’).cycle({
fx: ‘turnDown’,
delay: -4000
});$(‘#up’).cycle({
fx: ‘curtainX’,
sync: false,
delay: -2000
});});
</script><?php wp_head(); ?>
</head>
This works fine. But i want to only code in function.php and remove the js link in header.phpCan u guys can help me??
and one more thing…
<script type=”text/javascript”>
$(function() {
$(‘#slideshow’).cycle({ slideExpr: ‘img’ });$(‘#zoom’).cycle({
fx: ‘zoom’,
sync: false,
delay: -2000
});$(‘#slide’).cycle({
fx: ‘turnDown’,
delay: -4000
});$(‘#up’).cycle({
fx: ‘curtainX’,
sync: false,
delay: -2000
});});
</script>The above code is used for sliding the image… what should be done to this code.. Currently I am using this code in header.php
Forum: Fixing WordPress
In reply to: Problem in linking the js fileHello Mr.Ravi
I do have one more question…
while linking js file,do we have to add js code and link to the header.php file also??Forum: Fixing WordPress
In reply to: How to setup image path in wordpress?Thank you stephencottontail… It works… 🙂