Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter imbecillen

    (@imbecillen)

    @famethemes

    It works like a charm!!

    Thank you so much for the great support and for your wonderful theme ??

    Thread Starter imbecillen

    (@imbecillen)

    @famethemes

    Okey, I tried but it didn’t work as intended. It may be that I’m doing something wrong so I post my edits here.

    In the function.php for the child theme I write the code down under in the end of the file. I also copy the plugin.js file and directory path over to the child theme, as well as ereasing the lightgallery code part from the file so it can’t be read from the new file. Is it correct? Do I need to type in the priority order for the action to appear maybe? If so, which priority should I have?

    Thanks a lot for your support!

    
    /**
     * Custom code
     * Turn off default lightgallery.
     * /assets/js/plugins.js
     */
    
    function remove_scripts() {
    	//----- JS
      wp_dequeue_script( 'plugins' ); 
          wp_deregister_script('plugins'); 
    }
    
    add_action('wp_print_scripts', 'remove_scripts');
    
    /**
     * Custom code
     * Enqueue a script with jQuery as a dependency.
     * Get plugin.js from childtheme instead.
     */
    function wpdocs_scripts_method() {
        wp_enqueue_script( 'plugins', get_stylesheet_directory_uri() . '/assets/js/plugins.js', array( 'jquery' ) );
    }
    add_action( 'wp_enqueue_scripts', 'wpdocs_scripts_method');
    
    Thread Starter imbecillen

    (@imbecillen)

    Thanks a lot @famethemes!

    So if I use a child theme, how do I make the child ignore the parent? Just copy the pathway, files and erease the code doesn’t seem to work at least.

    Do I need to make a remove_action or something? Thanks a lot for your answer!

    Thread Starter imbecillen

    (@imbecillen)

    I did solve the problem!

    <div class="post-nav">
              <div class="post-prev"> <?php previous_post_link('%link', 'Previous in category', TRUE); ?>  </div>
    			   <div class="post-next"><?php next_post_link('%link', 'Next in category', TRUE); ?></div>
Viewing 4 replies - 1 through 4 (of 4 total)