Skip to main content
Question Protected by miken32
edited tags
Link
dan1st
  • 17.1k
  • 17
  • 115
  • 145
added 83 characters in body
Source Link
Zammuuz
  • 708
  • 5
  • 19
  • 44

I'm working on a responsive wordpress theme with Bootstrap v3.0.2.

In mobile/tablet browsers instead of the whole menu i need to show the Bootstrap toggle button. My button is showing, but when I click on it nothing is happening. This is code I wrote in my header.php :

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 

And the one I wrote in function.php :

function wpt_register_js() { wp_register_script( 'jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery' ); wp_enqueue_script('jquery.bootstrap.min'); } add_action( 'init', 'wpt_register_js' ); function wpt_register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueue_scripts', 'wpt_register_css' ); 

the footer.php code contains:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="js/bootstrap.min.js"></script> <?php wp_footer();?> </body> 

the header.php contains:

<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php wp_title('|', true, 'right'); ?></title> <link href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="<?php echo get_template_directory_uri(); ?>/css/style.css" rel="stylesheet" type="text/css"> <?php wp_head(); ?> </head> 

this question is resolved by using the answer of Bass Jobsen.thanks friend

I'm working on a responsive wordpress theme with Bootstrap v3.0.2.

In mobile/tablet browsers instead of the whole menu i need to show the Bootstrap toggle button. My button is showing, but when I click on it nothing is happening. This is code I wrote in my header.php :

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 

And the one I wrote in function.php :

function wpt_register_js() { wp_register_script( 'jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery' ); wp_enqueue_script('jquery.bootstrap.min'); } add_action( 'init', 'wpt_register_js' ); function wpt_register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueue_scripts', 'wpt_register_css' ); 

the footer.php code contains:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="js/bootstrap.min.js"></script> <?php wp_footer();?> </body> 

the header.php contains:

<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php wp_title('|', true, 'right'); ?></title> <link href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="<?php echo get_template_directory_uri(); ?>/css/style.css" rel="stylesheet" type="text/css"> <?php wp_head(); ?> </head> 

I'm working on a responsive wordpress theme with Bootstrap v3.0.2.

In mobile/tablet browsers instead of the whole menu i need to show the Bootstrap toggle button. My button is showing, but when I click on it nothing is happening. This is code I wrote in my header.php :

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 

And the one I wrote in function.php :

function wpt_register_js() { wp_register_script( 'jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery' ); wp_enqueue_script('jquery.bootstrap.min'); } add_action( 'init', 'wpt_register_js' ); function wpt_register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueue_scripts', 'wpt_register_css' ); 

the footer.php code contains:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="js/bootstrap.min.js"></script> <?php wp_footer();?> </body> 

the header.php contains:

<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php wp_title('|', true, 'right'); ?></title> <link href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="<?php echo get_template_directory_uri(); ?>/css/style.css" rel="stylesheet" type="text/css"> <?php wp_head(); ?> </head> 

this question is resolved by using the answer of Bass Jobsen.thanks friend

added 603 characters in body
Source Link
Zammuuz
  • 708
  • 5
  • 19
  • 44

I'm working on a responsive wordpress theme with Bootstrap v3.0.2.

In mobile/tablet browsers instead of the whole menu i need to show the Bootstrap toggle button. My button is showing, but when I click on it nothing is happening. This is code I wrote in my header.php :

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 

And the one I wrote in function.php :

function wpt_register_js() { wp_register_script( 'jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery' ); wp_enqueue_script('jquery.bootstrap.min'); } add_action( 'init', 'wpt_register_js' ); function wpt_register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueue_scripts', 'wpt_register_css' ); 

The funniest part is, this is working perfectly on localhost. But when I up it, it stops workingthe footer. I would really appreciate a solution to this problemphp code contains:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="js/bootstrap.min.js"></script> <?php wp_footer();?> </body> 

the header.php contains:

<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php wp_title('|', true, 'right'); ?></title> <link href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="<?php echo get_template_directory_uri(); ?>/css/style.css" rel="stylesheet" type="text/css"> <?php wp_head(); ?> </head> 

I'm working on a responsive wordpress theme with Bootstrap v3.0.2.

In mobile/tablet browsers instead of the whole menu i need to show the Bootstrap toggle button. My button is showing, but when I click on it nothing is happening. This is code I wrote in my header.php :

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 

And the one I wrote in function.php :

function wpt_register_js() { wp_register_script( 'jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery' ); wp_enqueue_script('jquery.bootstrap.min'); } add_action( 'init', 'wpt_register_js' ); function wpt_register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueue_scripts', 'wpt_register_css' ); 

The funniest part is, this is working perfectly on localhost. But when I up it, it stops working. I would really appreciate a solution to this problem.

I'm working on a responsive wordpress theme with Bootstrap v3.0.2.

In mobile/tablet browsers instead of the whole menu i need to show the Bootstrap toggle button. My button is showing, but when I click on it nothing is happening. This is code I wrote in my header.php :

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 

And the one I wrote in function.php :

function wpt_register_js() { wp_register_script( 'jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery' ); wp_enqueue_script('jquery.bootstrap.min'); } add_action( 'init', 'wpt_register_js' ); function wpt_register_css() { wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'bootstrap.min' ); } add_action( 'wp_enqueue_scripts', 'wpt_register_css' ); 

the footer.php code contains:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="js/bootstrap.min.js"></script> <?php wp_footer();?> </body> 

the header.php contains:

<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php wp_title('|', true, 'right'); ?></title> <link href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="<?php echo get_template_directory_uri(); ?>/css/style.css" rel="stylesheet" type="text/css"> <?php wp_head(); ?> </head> 
edited tags
Link
Bass Jobsen
  • 49.1k
  • 16
  • 147
  • 226
Loading
added 58 characters in body
Source Link
zessx
  • 68.9k
  • 29
  • 139
  • 166
Loading
added 551 characters in body
Source Link
Zammuuz
  • 708
  • 5
  • 19
  • 44
Loading
edited tags
Source Link
Zammuuz
  • 708
  • 5
  • 19
  • 44
Loading
Source Link
Zammuuz
  • 708
  • 5
  • 19
  • 44
Loading