Viewing 4 replies - 1 through 4 (of 4 total)
  • Hm, I have an idear:
    The problem seems to be the vertical-one-page.js which is loaded on some pages even if the vertical one page tmeplate is not in use.
    It “hijacked” the anchor links…and that caused the trouble.

    I have to look deeper into it but as a quick fix (especially if you dont use the vertical-one-page template, remove the following code from inc/enqueue.php:

    		if ( ( is_page_template ( 'page-templates/vertical-one-page.php' ) || is_home() || is_single() ) && $loadit ) {
    			wp_enqueue_script( 'vertical-one-page', get_template_directory_uri() . '/js/vertical-one-page.js',
    			array( 'jquery' ), true );
    			$page_for_posts = strtolower( get_the_title( get_option( 'page_for_posts' ) ) );
    			$home_url       = home_url();
    			$is_single      = is_single();
    			$vars           = array(
    				'pageForPosts' => $page_for_posts,
    				'homeUrl'      => $home_url,
    				'isSingle'     => $is_single,
    			);
    			wp_localize_script( 'vertical-one-page', 'vars', $vars );
    		}
    • This reply was modified 7 years, 11 months ago by understrap.
    Thread Starter Ankit Singla

    (@aksingla)

    Thanks, Holger for pointing out the issue. I solved it using wp_dequeue_function used in child theme functions file.

    function understrap_remove_scripts() {
        wp_dequeue_style( 'understrap-styles' );
        wp_deregister_style( 'understrap-styles' );
    
        wp_dequeue_script( 'understrap-scripts' );
        wp_deregister_script( 'understrap-scripts' );
    	
    	wp_dequeue_script( 'vertical-one-page' );
    
        // Removes the parent themes stylesheet and scripts from inc/enqueue.php
    }
    add_action( 'wp_enqueue_scripts', 'understrap_remove_scripts', 20 );

    As you have used the remove scripts function and added the it with a higher priority it dequeued the vertical-one-page.js

    Thanks for your quick reply.

    Thread Starter Ankit Singla

    (@aksingla)

    Hello Holger,

    This is not relevant to above but when I setup the child theme through the npm – it removed the sidebar on the pages.

    It seems that:

    Module:

      D:\wamp\www\Clients\omak\ijarnd\ijarndrevamp\wp-content\themes\the-journal\node_modules\undescores-for-npm\functions.php (1 hit)
    	Line 91: 		'id'            => 'sidebar-1',
      D:\wamp\www\Clients\omak\ijarnd\ijarndrevamp\wp-content\themes\the-journal\node_modules\undescores-for-npm\sidebar.php (2 hits)
    	Line 10: if ( ! is_active_sidebar( 'sidebar-1' ) ) {
    	Line 16: 	<?php dynamic_sidebar( 'sidebar-1' ); ?>
      D:\wamp\www\Clients\omak\ijarnd\ijarndrevamp\wp-content\them

    is adding in the sidebar with id: ‘sidebar-1’ in the page.php and few other files, but the sidebar available in the new Understrap are left or right or others.

    You might want to check them.

    Thanks for the wonderful framework you have given. We are still to learn from it.

    • This reply was modified 7 years, 11 months ago by Ankit Singla.

    Hi!

    That comes from the “underscores_for_npm” dependency and is not relevant.
    The child and parent theme just use the JS file and some scss from this package, and don′t use the functions (including its sidebar names / positions) from it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bootstrap Tabs (Nav Pills) Not Working in Post View’ is closed to new replies.