Hello all. I have made many bootstrap themes for WordPress but this is happening to me the first time. The toggle of navbar does not work on mobile view. Here si the link of my home page http://www.yei-uganda.org/. Bellow, I am also sending you the commands that are exciting in my functio.php file.: "<?php //Some simple code for our widget-enabled sidebar // custom menu example @ https://digwp.com/2011/11/html-formatting-custom-menus/ /** * Filters wp_title to print a neat <title> tag based on what is being viewed. * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. */ function theme_name_wp_title( $title, $sep ) { if ( is_feed() ) { return $title; }
global $page, $paged;
// Add the blog name
$title .= get_bloginfo( 'name', 'display' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title .= " $sep $site_description";
}
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title .= " $sep " . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );
}
return $title;
}
add_filter( ‘wp_title’, ‘theme_name_wp_title’, 10, 2 );
/**
- Enqueue scripts and styles
*/
// Register Custom Navigation Walker
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’ );
function wpb_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar 2', 'wpb' ),
'id' => 'sidebar-2',
'description' => __( 'The main sidebar appears on the right on each page except the front page template', 'wpb' ),
'before_widget' => '',
'after_widget' =>'',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
‘name’ => __( ‘Sidebar 3’, ‘wpb’ ),
‘id’ => ‘sidebar-3’,
‘description’ => ( ‘The main sidebar appears on the right on each page except the front page template’, ‘wpb’ ),
‘before_widget’ => ‘’,
‘after_widget’ => ‘’,
‘before_title’ => ‘<h3 class=“widget-title”>’,
‘after_title’ => ‘</h3>’,
) );
register_sidebar( array(
‘name’ =>( ‘Sidebar 4’, ‘wpb’),
‘id’ => ‘sidebar-4’,
‘description’ => __( ‘Appears on the static front page template’, ‘wpb’ ),
‘before_widget’ => ‘’,
‘after_widget’ => ‘’,
‘before_title’ => ‘’,
‘after_title’ => ‘’,
) );
}
add_action( ‘widgets_init’, ‘wpb_widgets_init’ );
function mytheme_setup() {
register_nav_menus(
array(
‘footer_nav’ => __( ‘Footer Menu’, ‘bootpress’ ),
‘top_menu’ => __( ‘Top Menu’, ‘bootpress’ )
)
);
}
//Register area for custom menu
//Code for custom background support
add_custom_background();
//Enable post and comments RSS feed links to head
add_theme_support( ‘automatic-feed-links’ );
// Enable post thumbnails
add_theme_support(‘post-thumbnails’);
set_post_thumbnail_size(520, 250, true);
?>"
I will appreite your assistant as this is an NGO page and they need it in order to collect money and attract volunteers.
Thank you in advance
Marina