bonsrec
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: functions.php enqueue is breaking siteThanks for getting back to me @joyously , unfortunately that is exactly what I am doing. I am copying the wp hooks and calls from a twentytwenty installed theme, trying to learn how they’ve done it through trial and error.
The annoying thing is I’ve fixed it now and it was from doing something nobody here has mentioned.
Everybody is talking about using the
get_template_directory_uri()which never works for me,however
get_bloginfo('template_directory')worked fine. So no idea still how it’s sorted.Extremely frustrating!
@diddledan, apologies that was a typo, fixed and the error continued.
@sterndata apologies for the profanity and frustration but no mod has helped me on this forum, including yourself!
- This reply was modified 6 years, 3 months ago by bonsrec.
Forum: Developing with WordPress
In reply to: functions.php enqueue is breaking sitePlease help me, i’ve been banging my head against a wall for nearly a week now and i’m ready to give up.
I’d rather just load it in via <script> and <style> tags and be done with this [ expletive deleted ] functions method of calling.
- This reply was modified 6 years, 3 months ago by Jan Dembowski.
Forum: Developing with WordPress
In reply to: functions.php enqueue is breaking siteNope, still not working. I’ve reverted back to installing a completely blank theme. Got my header and footer .php all set up etc, created a brand new functions file, i’m trying to ENQUEUE ONE STYLE – Bootstrap.
<?php function load_stylesheets() { wp_register_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), false, 'all'); wp_enqueue_style('boostrap'); } add_action('wp_enqueue_scripts', 'load_stylesheets');What am i doing wrong? It’s not pulling from anywhere and i’m following this tutorial on youtube @ https://www.youtube.com/watch?v=pFMgAWkrk8o&list=LLidYAyGVrM7DuqOhhI9JQRQ&index=3&t=0s
[profanity removed]
- This reply was modified 6 years, 3 months ago by Steven Stern (sterndata).
Forum: Developing with WordPress
In reply to: functions.php enqueue is breaking siteHi thanks for getting back to me,
Could you just explain how I’m listing the WP Jquery as a dependency? What piece of code is doing that specifically?
I’m new to all these WP hooks and calls and wordpress in general. I’m a vanilla front end developer but having real issues with wordpress when working OUTSIDE a custom theme. Seems great if you have no idea how to code! Awful if you wanna get really customizable with it..
This line
wp_enqueue_script( 'devwp-jquery' , get_template_directory_uri() . '/jquery-3.2.1.min.js' , array( 'jquery' ), 1, true);I’m simply calling jquery later? Where is wordpress pulling the default? Checked functions and themes :S giving me a headache lol.
- This reply was modified 6 years, 3 months ago by bonsrec.
Forum: Developing with WordPress
In reply to: functions.php enqueue is breaking siteThe email i receive with the error on is just as weird, it’s saying i have an excess ) somewhere, Which I don’t. Argh, this wordpress php is awful unless you’re using a pre built theme!
Error Details
=============
An error of type E_PARSE was caused in line 15 of the file /home/dh_mw68yv/bonsonline.com/wp-content/themes/bons/functions.php. Error message: syntax error, unexpected ‘)’