Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Andrés Villarreal

    (@andrezrv)

    Hi rompelstilchen,

    I think you need to make sure your Bootstrap package includes the carousel library. Take a look at https://getbootstrap.com/javascript/.

    Also, are you including your own jQuery, or using the one that comes bundled with WordPress?

    Once you checked those two things, if the carousel still doesn’t work, I’d suggest to go back to one of the default themes (Twenty Fourteen, Twenty Thirteen, etc.) and deactivating all the plugins with the exception of this one and whatever you use to include Bootstrap. Then the carousel should work, and you can reactivate your plugins and theme one by one until finding out what causes the issue.

    Hope this helps ??

    Thread Starter rompelstilchen

    (@rompelstilchen)

    ok,

    thanks

    “I think you need to make sure your Bootstrap package includes the carousel library. Take a look at https://getbootstrap.com/javascript/.”

    i dont see anything about bootstrap including carousel,but something about coding with bootstrap; besides it should be the other way around

    also i did not even know there was a jquery bundled with wp
    i went to jquery official donwload page

    too bad the plugin system is not more automated, i don’t really like the “modify header.php” paradigm

    Thread Starter rompelstilchen

    (@rompelstilchen)

    here is my include lines

    [!–bootstrap–]
    [script type=”text/javascript” src=”/jquery-2.1.0.min.js”][/script]
    [script type=”text/javascript” src=”/bootstrap/js/bootstrap.min.js”][/script]
    [link rel=”stylesheet” type=”text/css” href=”/bootstrap/css/bootstrap.min.css” /]
    [link rel=”stylesheet” type=”text/css” href=”/bootstrap/css/bootstrap-responsive.min.css” /]

    Thread Starter rompelstilchen

    (@rompelstilchen)

    i tried this

    [script type=”text/javascript” src=”/wp-includes/js/jquery/jquery.js”][/script]

    but i got the same issue

    `jQuery(document).ready( function($) { $(‘#agnosia-bootstrap-carousel’).carousel( { interval : 3000 , pause : “hover” } ); } );

    “undefined is not a function”

    Plugin Author Andrés Villarreal

    (@andrezrv)

    Carousel is a Bootstrap plugin. The link I posted says:

    Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

    So you’re probably OK about the carousel inclusion if you’re using one of those files.

    But you should not include your own version of jQuery, even if it’s from the official jQuery site. The one that comes bundled with WordPress should work, because is the one that have been tested with your WordPress version. Remove your own version and check your printed HTML code to see if jQuery is loading in the head of the document. If it’s not, apparently something is wrong with your theme or installation.

    Also, how are you including Bootstrap? Is it with a shortcode, enqueueing the files, or manually pasting the code into your HTML? Please make sure your Bootstrap file is actually being loaded,

    I think I didn’t quite understand what you said about modifying header.php, but in any case you should not do that. Styles and scripts should be loaded by using the wp_enqueue_style() and wp_enqueue_script() functions. That’s meant for not having to edit HTML and plugins files if you need extra scripts or styles.

    One more thing: Have you tried disabling all the other plugins and going to one of the default themes?

    Thread Starter rompelstilchen

    (@rompelstilchen)

    ok i’ll check all these

    i use [gallery type="carousel" ...] in my page text

    thx for the help ??

    Thread Starter rompelstilchen

    (@rompelstilchen)

    I added this to function.php but I still get the same js error, and the carousel stil does not autostart

    i also notice the carousel stops working , then it starts again after a long period of time for no reason

    can you have a look ? https://robot.isp.imath.be/robot-monk/

    if (function_exists('load_my_scripts'))
    {
        function load_my_scripts()
        {
        	if (!is_admin())
    	{
    	    wp_enqueue_script('bootstrap_script',"/bootstrap/js/bootstrap.min.js");
    	    wp_enqueue_style('bootstrap_css', "/bootstrap/css/bootstrap.min.css" );
    	    wp_enqueue_style('bootstrap_responsive_css', "/bootstrap/css/bootstrap-responsive.min.css" );
        	}
        }
    }
    add_action('init', 'load_my_scripts');

    i also noticed in firefox i get the error “carousel is not a function”

    Plugin Author Andrés Villarreal

    (@andrezrv)

    There are two instances of jQuery being loaded. I suppose the first one is added from your theme or from a plugin, so you need to remove that one first. Also, I’d suggest to load the Bootstrap JS in the footer of HTML document. Take a look at the Codex entry about wp_enqueue_script() if you need to know how to do that.

    Thread Starter rompelstilchen

    (@rompelstilchen)

    how do you see there is 2 instances loaded ?

    Plugin Author Andrés Villarreal

    (@andrezrv)

    Just by looking at your source code. Lines 26 and 38 in your home page, for example.

    Thread Starter rompelstilchen

    (@rompelstilchen)

    ok the problem was contact form 7
    now i gonna have to use another plugin or figure out how to have both working
    i read that loading stuffs in the footer was not working for every browser

    Plugin Author Andrés Villarreal

    (@andrezrv)

    So now the carousel starts automatically?

    As far as I know, Bootstrap doesn’t trigger any problem when loading in the footer. I use it in my sites that way and I’ve never had any issue.

    You can remove scripts loaded by other plugins using wp_deregister_script().

    I am having the same issue with autostart not working until clicking once.
    Nothing I do seems to resolve it.

    See logicode.co/gallery

    Thanks!

    I disabled contact form 7, which I had installed also, and still have the issue.

    Plugin Author Andrés Villarreal

    (@andrezrv)

    Hi merchantweb, thanks for your feedback ??

    The best way to debug this would be switching to one of the default themes, like Twenty Fourteen or Twenty Thirteen, and deactivating all other plugins until you find which one is causing the issue. By only looking at your source code, I can’t identify the problem, but there’s some jQuery plugins being loaded that could be interfering with Bootstrap.

    Regarding your other issue, I’ll take a look at the other thread you started.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Plugin does not auto start’ is closed to new replies.