Forum Replies Created
- AuthorPosts
- MatiasPParticipant
I solved it. I was dequeuing and enqueuing the scripts incorrectly. Here’s the final code:
add_action( 'wp_enqueue_scripts', 'total_custom_dequeing_scripts', 99999); function total_custom_dequeing_scripts() { wp_dequeue_script('total-custom'); wp_deregister_script('total-custom'); wp_dequeue_script('owl-carousel'); wp_deregister_script('owl-carousel'); wp_enqueue_script( 'child-total-custom', get_stylesheet_directory_uri() . '/js/total-custom.js', array('jquery'), '20150903', true ); }
MatiasPParticipantOk, it looks like the error was of my own doing. I overrode the original total-custom.js file on my child theme to customize some things. As soon as I commented out that code on my functions.php file, that error does not appear anymore. But now I’m wondering what I did wrong. This is how I’m enqueing my own total-custom.js file in my functions.php file:
wp_dequeue_script('total-custom'); wp_dequeue_script('owl-carousel'); wp_enqueue_script( 'total-custom', get_template_directory_uri() . '/js/total-custom.js', array('jquery'), '20150903', true );
What’s in my total-custom.js file can’t be the problem because I only changed some transition time values. That’s it. What could it be?
MatiasPParticipantThis error is outputted in the console every time this happens:
MatiasPParticipantI doubt it.
MatiasPParticipantIt works! Thank you!
June 7, 2017 at 8:58 pm in reply to: Display both the logo and the default site tagline text on the Header #3026MatiasPParticipantFor the people who want this as well, this is how I solved it:
I overrode the file header.php on a child theme. This is all you have to change:
<div id="ht-site-branding"> <?php if ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) : // <---delete this if the_custom_logo(); else : // <---delete this too if ( is_front_page() ) : ?> <h1 class="ht-site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <?php else : ?> <p class="ht-site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> <?php endif; ?> <p class="ht-site-description"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'description' ); ?></a></p> <?php endif; ?> </div><!-- .site-branding -->
Then, to make everything be displayed correctly, I wrapped the site title and description on a div called “”ht-site-title-and-desc”. Then, on the “additional CSS” section on WordPress, I added this:
#ht-site-title-and-desc { float:left; width:80%; padding:inherit; padding-left:5px; }
MatiasPParticipantYou can just paste the piece of code @nguyen4514 shared in the “Additional CSS” section on the WordPress Live Customizer.
- AuthorPosts