ourcore
Forum Replies Created
-
Still not working after a few days, so it can’t be an indexing issue. Any suggestions?
Ah, yes. I thought it could’ve been that, but wasn’t sure since the indexing showed as complete. Thanks!
Forum: Plugins
In reply to: [Contact Form 7] CSS Conflicts with JetpackYes, I agree. This was the CSS I wrote for the form before I integrated it with CF7. I took another look and realised it was a pretty simple fix. I’ll apply this shortly. Thanks.
EDIT: Also, had to use higher specificity (i.e.
.contact-form .wpcf7 input.input-field
) to override Jetpack’s styles.Forum: Plugins
In reply to: [Contact Form 7] CSS Conflicts with JetpackSee the first two fields on the contact form here: https://marioparra.me. Yes, I just wanted to see if there was a solution that didn’t involve writing extra CSS.
Forum: Fixing WordPress
In reply to: Adding class to menu anchorsNevermind–found the solution in a previous thread: https://www.ads-software.com/support/topic/adding-class-or-id-to-wp_nav_menu-using-php?replies=9#post-2615052.
Forum: Plugins
In reply to: [Contact Form 7] Allowing polyfill HTML5 data values(Accidental second post)
Forum: Fixing WordPress
In reply to: Unable to run JS file in custom themeYou did it! I was calling creative.js directly after Bootstrap, instead of at the bottom. I re-ordered the files in my functions.php and now everything’s working!
Wow, I’ll never overlook the order that I call my scripts in ever again. Thanks, Andrew.
Forum: Fixing WordPress
In reply to: Unable to run JS file in custom themeI’ll keep that in mind. I’m only running it locally at the moment, but I’ll upload it to my server tonight to troubleshoot further.
In the meantime, this is the template version: https://www.marioparra.me. Thanks.
Forum: Fixing WordPress
In reply to: Unable to run JS file in custom themeI see what you mean. I hadn’t thought about the Bootstrap dependency. Unfortunately, I’m still getting the same error.
Here’s my functions.php:
<?php function mparra_styles() { wp_enqueue_style ( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css') ; wp_enqueue_style ( 'font-awesome', get_template_directory_uri() . '/fonts/font-awesome/css/font-awesome.min.css' ); wp_enqueue_style ( 'creative', get_template_directory_uri() . '/css/creative.css' ); wp_enqueue_style ( 'style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style ( 'mobile', get_template_directory_uri() . '/css/mobile.css' ); wp_enqueue_style ( 'magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css' ); wp_enqueue_style ( 'animate', get_template_directory_uri() . '/css/animate.min.css' ); } add_action( 'wp_enqueue_scripts', 'mparra_styles' ); function mparra_scripts() { wp_enqueue_script ( 'civem', '//cloud.github.com/downloads/javanto/civem.js/civem-0.0.7.min.js' ); wp_enqueue_script ( 'websim', get_template_directory_uri() . '/js-webshim/minified/polyfiller.js' ); wp_enqueue_script ( 'recaptcha', '//google.com/recaptcha/api.js' ); wp_enqueue_script ( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true ); wp_enqueue_script ( 'creative', get_template_directory_uri() . '/js/creative.js', array('bootstrap'), '', true ); wp_enqueue_script ( 'jquery-easing', get_template_directory_uri() . '/js/jquery.easing.min.js', array('jquery'), '', true ); wp_enqueue_script ( 'jquery-fittext', get_template_directory_uri() . '/js/jquery.fittext.js', array('jquery'), '', true ); wp_enqueue_script ( 'wow', get_template_directory_uri() . '/js/wow.min.js' ); wp_enqueue_script ( 'magnific-popup', get_template_directory_uri() . '/js/jquery.magnific-popup.min.js', array('jquery'), '', true ); } add_action( 'wp_enqueue_scripts', 'mparra_scripts' ); remove_filter( 'the_content', 'wpautop' ); ?>
Forum: Fixing WordPress
In reply to: Unable to run JS file in custom themeThat’s how I’m interpreting the error too, but I don’t understand why it’s not being loaded. I’m calling Bootstrap in the header, and from what I can see, it includes Scrollspy: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js?ver=4.4.2.
I’m separately calling WOW.js, but still none of creative.js is running.
Forum: Fixing WordPress
In reply to: Unable to run JS file in custom themeHi, Andrew.
I included the Uncaught TypeError from the Chrome console. This is the only error as all other files are running correctly.
The file in question is a collection of small scripts that do a few things, including stylizing <h1> using the FitText plugin, stylizing the navbar after scrolling, and initializing WOW.js, and none of these effects are being applied, so I believe the entire creative.js file is not running.
I started with a Bootstrap template and converted it to a WordPress theme from scratch.
Thanks.
Forum: Fixing WordPress
In reply to: Unable to run JS file in custom themeHi, Dominic,
I’ve confirmed by reviewing my executed page source and jQuery 1.11.3 and Bootstrap 3.3.6 are being called in the header, while creative.js is in the footer.
I’ve also ensured to add jQuery as a dependancy:
wp_enqueue_script ( ‘creative’, get_template_directory_uri() . ‘/js/creative.js’, array(‘jquery’), ”, true );The only difference from when I was running the site outside of WordPress is that I was using local copies of jQuery and Bootstrap. Really not sure what could be causing the issue.
Thanks.