Started on your hourly tutorial, but decided to go through the individual videos. They give you a chance to go over things in more detail and it's easier to stop and start as necessary. Thanks.
@@mrdigitalau function load_css() { wp_register_style('bootstrap',get_template_directory_uri() . '/css/bootstrap.min.css', array(),false, 'all'); wp_enqueue_style('bootstrap'); } add_action('wp_enqueue_scripts','load_css'); its not working . please help me
Sir, I've just posted on episode 1, followed through to this one (not it's sleep time, work tomorrow), but I wanted to follow up my other comment with a thank you. This is really good, and extremely well explained. Especially like that you've kept typos in, since that will happen to the best of us. I'll be sticking with this course and looking out for more of your content.
Where are you, my digital brother! I seldom praise people ( ya...i know, I need to correct that), but i guess that you deserve a huge praise from me because you have done a fantastic job of teaching people how to build a wordpress site. Anyway, be good, be wise and be happy wherever you are, and hope you come back again to us with some more tutorial materials.
Thank you so much for this tutorial , please make more videos like this. Also i would like to see some tutorials for Wordpress API and maybe something about Wordpress Headless CMS.
As a new developer I've been pretty lazy with semicolons.. And now I've found out why you should include them. It doesn't work without them! So now I'll start using semicolons lol.
Bloody excellent. I've been searching reading and doing WP Theme creation over the last week or so and I found out plenty. But this series has helped me underline everything I've done, fixed a problem I had, or two, and much more. Plus you've introduced me to Laragon. I'm developing with XAMP and BITAMI but I will give Laragon a whirl. You see I was never happy with WP Themes I used and changing them was a headache so I decided to create my own. I got into HTML, CSS and PHP for the same reason, I didn't like what was on offer. Unfortunately I've never earned a penny from any of it in 15 years, I kept having to take a job! I have to laugh as I live in hope. But I love being able to create! So excellent, you will get a mention in my Blog post about creating with WP. I should add that I did create php pages in the folder before I knew anything but again I've learnt plenty in that regard as at the time I didn't really know how WP worked so I created the usual pages of Index, about and contact. Then I found out how the Index page was used, why there is a font-page.php and about creating additional pages which is where I am now. I already had my website, the one I'm playing with, broken down into body, header and footer using the PHP Includes function ( I found out about that because I was updating every page. I had worked with SQL and learned to break things down into smaller pieces) so I just had to copy the code from one page (existing) to another(new) and change paths to images etc. I'm now getting exactly what I WANT from a WP Theme. I and having to work as cheaply as possible as this does cost but I've learnt to keep my costs to a bear min.
Wow.. wonderful series. Please upload rest of them. It would be helpful if you could include links (WordPress documentation) that you are referring in the video. Your way of explaining things is good. Thanks. Lots of Love
If I stop this video at 18:27 min. I see that there is a element with a '.container' class, and an element. I checked and rechecked several times, this video and the previous video. But I couldn't figure out, exactly at what point and in which file the above 2 HTML elements were added. Could somebody point it out?
I had the same and later discovered that I had forgotten to change the home page to static, that resolved it. Probably too late now as it was a year ago but it might help someone else :)
Your english so fluent and clean. I bought a UDEMY course in my native. That was so fucking feckless. Please add somewhere in your channel a "Buy me a beer link." Huge thanks.
Hard lesson learn check for spelling errors I spent way too long looking at the code to only realize I forgot the s in the functions file name. Thank you for the tutorial.
Thanks mate really appreciate the comments. You can see all the docs here: developer.wordpress.org/themes/getting-started/ But they are a bit painful :)
Thank you very much for the tutorials so far. I have a query. The html:5 the tab doesn't do anything for me on sublime text, i also tries CTRL+SPACE and that just gave me 'No available completion' on the bottom left. Is there any way of fixing this?
Great tutorial, Sean. I am following along with Dreamweaver. With the add_actions I get the following: "Uncaught Error: Call to undefined function add_action()". However, everything works in localhost. I would be curious to know why this is happening.
I'm stuck getting the bootstrap.min.css to load even though I am getting a path returned from the get template function: get_template_directory_uri() I've tried hard coding it but so far bootstrap links don't populate. Anyone have any ideas?
@@dardi1fan20 Having the same issue for hours now. bootstrap and js wont load. I deleted everything in the functuions.php folder and just left his code in and still nothing , please help
@@RyanSamir My bootstrap and js arn't loading into the page either, tried deleting everything and just using your code, still doesnt work. Can you please do a troubleshoot or work around of some sort? thank you
Changes I make to the theme in sublime show in the WP dashboard, however not the other way around. For example, I added pages in wp, but they do not show up in sublime text (code editor). How do I sync or fix this? Great tut's BTW (kindest thanks)
Thank you Mr. Digital! I do have a query- what if I have my custom css file? Can I used the; get_stylesheet_uri function? My custom css is in my folder in a file of its own. Could I do like Wp_enqueue_style('custom-style,', get_stylesheet_uri());
Hi. You can do this: wp_enqueue_style('custom_style', get_template_directory_uri() . '/your-folder/your-stylesheet.css'); As long as the custom css folder is in your theme folder.
@@mrdigitalau thank you sir kindly from Mexico. I did it and works but im having issues with my custom Javascript too ill do the same instead of style ill used script. Thank you. I'm really like it the ACF series
When you type the html:5 and press tab, if it does not work, it means the sublime text doesn't have HTML 5 installed. So all you need to do is: 1 Go to Tools--->Install Package Control 2 Then Go to Preferences--->Package Control--->Install Package 3 Wait sometimes and type HTML 5 Done.! Let's Rock The World.! Join With Me
Hey man. Just wondering, how do I open the file without going through the initial process of laragon (the part where the blue link is conveniently presented after a brief installation) and how do I get the test pages to open. thanks a bunch
Thank you so much for your work. You don't need separate jquery enque. in 'wp_register_style' dependency list should be an array ( ['jquery'] ), you just did that small mistake. Thank you.
Please could you clarify as your sentence doesn't read well - is this something we need to know? And why? I am beginner at this and your comment looks like it is important but Mr Digital didn't answer you so is it something that will cause problems later? Thank you
@@aletheialouise wp_register_script('bootstrapjs', get_template_directory_uri() . '/js/bootstrap.bundle.min.js', ['jquery'], false, true); the statement above works without separately queuing jquery. It loads jquery before bootstrapjs. Third argument of wp_register_script is dependency list (it's an array not string), and that was the small mistake. Please read the documentation.
i am having a minor issue yours at the end of the lession shows Home text mine doesnt and anything i create on the page doesnt display the code is Identical to yours i even did the checks so confused
@@mrdigitalau I figured it out watching the next video in the playlist you showed your code for the Home page in the beginning. it had the tags which some how i missed while following along in the prior vid. not sure how. so the Home wasnt showing on the web page after the lesson ended like yours did :) but i got it had a feeling a line of code was missing somewhere. thank you for replying :) Love your Video i have wanted to learn how to scratch Build for a long time. been using things like elementor and miss the old days of just html and css :) now to make my own Themes :) TY again for your time and your Videos :)
@@silverlanswoodworking I'm not sure have you already solved your problem? but I try to add this function between function "get" on the front-page.php then that worked
@@NooMJeSWanG yes after watching the second video your code changed from the ending of the 1st part so you must of did an edit off camera. I havent worked on the project in a Long time i mean i posted 7 months ago lol and life hit us pretty hard after that. hope your safe btw :) all the best keep up the great Videos :) i still watch even if i cant code right now. from Viruses to deaths to riots to storms to tornado's can this year just stop lol
Hi there, thanks for the tutorial. When I add function get_header(); it gives me an error undefined function call, please tell me how to solve this problem, Regards
i do everything like you do on the vid, but when i see my page source there's no jquery.migrate.js, and can i know why was that happen? and what the impact of it?
@Mr Digital, ihave a problem, my bootstrap.min.js is not present on my footer source code, jquery and bootstrap.min.css are here in the header but not the js part of bootstrap, i don't understand why.. her is my code: function load_js() { wp_enqueue_script('jquery'); wp_register_script('bootsrap', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery', false, true); wp_enqueue_script('bootstrap'); } add_action('wp_enqueue_scripts', 'load_js'); Can you help me please ?
Hi, I've been having trouble with my enqueued style sheets. If i modify them the changes never take on my theme. I've cleared my cache and history, still nothing. Anyone have the answer to why i can't make changes to my css files that i have enqueued?
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in C:\laragon\www\test\wp-includes\class.wp-dependencies.php on line 312 There has been a critical error on your website. please explain! this error came up after loading the site after load_js function I tried editing wp-config.php by adding define( 'WP_MEMORY_LIMIT', '256M' ); and the error is still there
I believe the admin CSS is overwriting my main.css stylesheet. Possibly because of the new versions of wordpress. When I go to the site incognito the main.css looks correct (as I am just a visitor and no admin bar comes up). Anyone else having this issue and know how to fix it?
Front page works. Adding a page 404 error, but then it started sending me to my Xampp dashboard. I know you're using Laragon, but should it matte? What am I missing here? I have all the php files you have, the front page is fine, the styles are working.
You're welcome. Make sure to double check spelling of the template names, if they are not right then it will not detect it, it is a simple mistake. Cheers
Great course so far @MrDigital. Question to you or anyone... My code is equal to yours through 17:26, but my bootstrap.min.js is showing up in the body and not the footer. In fact 'nothing' is showing below the tag. What could be wrong? Here's my code block: function load_js() { wp_register_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js' , 'jquery', false, true); wp_enqueue_script('bootstrap'); } add_action('wp_enqueue_scripts', 'load_js');
Inserted the HTML in code in header and footer files, closing code in footer, also insect source did not display the code as showing here at the stamp time: 3:55 mints. could u plz share email or any other way to share my screenshots with you,, to make sure that everything was implemented correctly, but not seeing the same results, I stuck at here... by the way, I have another local server installed on my machine: Local by flywheel, do you think this is what creates the confuse of server at laragon server? shall I delete the other server? just additional info to make an assessment of the situation,
Hiya on the last step I get a fatal error saying the allowed memory size has been exhausted. Does anyone know a fix for this? I will go through and check the code but I am fairly certain I have followed every step. Cheers No worries just made a mistake have fixed it now
I am stucked in this video as my bootstrap didnt show on my site. and I am watching and at the same time doing it. but bootstrap doesnt show in the view source :-( i dont know why. it seems i did correctly base on this video.
Nevermind. I noticed when you cut out to the next segment about jquery, you had the front page file open and must have added the following: Home I added this, and it came up as yours did.
Really appreciate this thanks. Have you thought about doing this kind of tutorial series but using WordPress with Tailwindcss? If so that would be amazing.
Great content Mr. Digital. Not many on the internet who teach as deep as you on Wordpress development. Keep going. One quick question. Bootstrap files are showing in the header section when I 'Inspect' in dev tools, but not working everywhere. Any suggestions?
That's a really great tutorial, but I have got some issues regarding "get_template_directory_uri()". That function didn't get me the current path:, Can you help me with this?
Fatal error: Out of memory (allocated 593494016) (tried to allocate 262144 bytes) in C:\laragon\www\Wordpress-Test\wp-includes\class.wp-dependencies.php on line 315
I have followed the exact same steps but I lost you at 6:05. The Admin bar will not show up, any idea why that may be the case? Great tutorial so far btw!! Thanks!
Unfortunately,,, there was an error message displayed in the main page: Warning: Use of undefined constant fasle - assumed 'fasle' (this will throw an Error in a future version of PHP) in C:\laragon\www\test\wp-content\themes\mytheme\functions.php on line 6
@@ДмитрийОвчинников-ъ8ш I fixed, but the solution was not that really the error, after posted the error message along with the whole screen of functions.php = in one forum someone told me to remove bootstrap string in the second line to load , after removed that worked properly, but stuck for long hours searching,, posting,, asking,, including wordpress help forum themselves they did not realize where is the error that causing the trouble!
Thanks for the series - enjoying it! What happens if we don't enqueue jQuery, will it break plugins? Or do other plugins automatically enqueue jQuery for you? And if “yes”, is it possible to have enqueued jQuery more than once? (Don't want to create too many HTTP requests)
Hi, sorry for the late reply. With WordPress, jquery is important because many plugins use it. It won't enqueue jquery more than once, which is great. When enqueuing your stylesheets, you can put a dependency in there for jquery and WordPress will automatically add it before that script. eg. wp_enqueue_style('test-script', 'script.css', ['jquery']);
The text in the front page: This is the front page - did't displayed, even tried to insert php code still not displayed,, checked the source code as well,
@@mrdigitalau YES,, everything done perfectly as said,, I double-checked this again and no any missing part at all,, confused where the wrong is? where is the missed part? I want to send you a screen shot from my dashboard,, but dont know how to this? bytheway, thank you very much for your quick replies, really appreciated
@@almadarplus same issue created a home page in Wordpress and the correct spelling of pages. I did noticed it appeared on the front page but when I placed the get footer and header nothing showed anymore
Hey mate. Typically admin bar missing would be that you have no in your footer.php. This is what calls all the JS that admin bar uses. Check that. Otherwise it's your User settings in Wordpress, you've disabled the admin bar to show. Good luck!
Thank you very much for sharing your knowledge. I am realy - beginner, and a little bit confused with bootstrap instalation. Maybe it is a bit different with v. 4.4.1 of Bootstrap, because I can't see bootstrap in my code sheet. Neider, jquery, and in later videos main.css file. Can you maybe see, what I'm doing wrong? I have checked my function.php file many times :-(
Thank you so much for this videos, they are absolutely useful. I've always had a doubt about theme development: security. What can we do in order to make the theme we are developing a very secure one? I try to look for information everywhere, but I couldn't find anything. I am not very sure about security issues and that kind of stuff. Thanks again!
Hi Alex, when you say security what are you specifically referring to? What are you trying to keep secure on your WordPress theme? WordPress is already built as a CMS for security, however, plugins that are poorly developed can sometimes be found to have security holes. A wouldn't think a theme could give you issues with security, especially the way we're building it (with minimal plugins) :)
Hey so i got this error when enqueuing javascript: Parse error: syntax error, unexpected 'function' (T_FUNCTION) this is my code: function load_js () { wp_register_script('uikitjs', get_template_directory_uri() . '/js/uikit.js', '', false, true); wp_enqueue_script('uikitjs'); } add_Action('wp_enqueue_scripts', 'load_js')
When I view source, "bootstrap.min.js" isn't loading or anywhere in my source code. Any idea why? It's installed in the theme directory. Here's my source code for functions.php: pastebin.com/DP751H9x
For Future References, You can now just enqueue it directly your scripts and styles using wp_enqueue_script *//_style for stylesheets* ( 'bootstrap-js', *//stylesheet/script alias* get_template_directory_uri().'/js/bootstrap.min.js', *//directory location (still use get_template_directory_uri()) -- for the stylesheets you can stop here.* array('jquery'), *//array of dependencies* false, *//string or boolean for version* true *//boolean for script location (footer/header)* )
I have problems. Not getting bootstrap in the sourcecode. I have checked it a 1000 times and cant get it to work. I have followed your instructions step by step. Here is my code:
You're videos are great, we should be paying to learn all these. Thank you for making them free. I've a small problem. I'm using VSCode as my compiler and i cannot run PHP code without downloading XAMP, VAMP or similar applications. is there any way you could suggest me without downloading any applications other than the Laragon?
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in C:\laragon\www\blog\wp-includes\cache.php on line 126 Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0 If you encountered this error the solution is down here add_action('wp_enqueue_scripts', 'load_js'); Delete the "s" from wp_enqueue_scripts should me wp_enqueue_script
Your tutorials are so underrated mate. You are absolutely one of best clearly explanatory teacher I've ever met on TH-cam. Cheers!
I will never say header and footer ever the same way again....hedah and footah love it! Awesome video series...Thank you!
haha, I get that a lot. What is different to the way you say it?
Started on your hourly tutorial, but decided to go through the individual videos. They give you a chance to go over things in more detail and it's easier to stop and start as necessary. Thanks.
You're welcome David. Any questions just ask and I am happy to help! Cheers
@@mrdigitalau
function load_css()
{
wp_register_style('bootstrap',get_template_directory_uri() . '/css/bootstrap.min.css',
array(),false, 'all');
wp_enqueue_style('bootstrap');
}
add_action('wp_enqueue_scripts','load_css');
its not working .
please help me
@@mrdigitalau code ok.. Wrong for file name. At first I will crate file name function.phn
but right functions.phn.. Than Working.
Following your tutorial on my Mac with M1...no issues so far. I installed MAMP and works like a charm. Thank you for sharing your knowledge.
You're welcome Jon, good luck - hit me up on here if you have any issues or questions :) CHeers
Sir, I've just posted on episode 1, followed through to this one (not it's sleep time, work tomorrow), but I wanted to follow up my other comment with a thank you. This is really good, and extremely well explained. Especially like that you've kept typos in, since that will happen to the best of us.
I'll be sticking with this course and looking out for more of your content.
Where are you, my digital brother! I seldom praise people ( ya...i know, I need to correct that), but i guess that you deserve a huge praise from me because you have done a fantastic job of teaching people how to build a wordpress site. Anyway, be good, be wise and be happy wherever you are, and hope you come back again to us with some more tutorial materials.
Wow, man. This is the right way to make tutorials. Thanks for this series!
Thank you :) Cheers
Thank you so much for this tutorial , please make more videos like this. Also i would like to see some tutorials for Wordpress API and maybe something about Wordpress Headless CMS.
You're welcome Mario, appreciate your support. Will try to do that in the next series! Cheers!
As a new developer I've been pretty lazy with semicolons.. And now I've found out why you should include them. It doesn't work without them! So now I'll start using semicolons lol.
Bloody excellent. I've been searching reading and doing WP Theme creation over the last week or so and I found out plenty. But this series has helped me underline everything I've done, fixed a problem I had, or two, and much more. Plus you've introduced me to Laragon. I'm developing with XAMP and BITAMI but I will give Laragon a whirl. You see I was never happy with WP Themes I used and changing them was a headache so I decided to create my own. I got into HTML, CSS and PHP for the same reason, I didn't like what was on offer. Unfortunately I've never earned a penny from any of it in 15 years, I kept having to take a job! I have to laugh as I live in hope. But I love being able to create! So excellent, you will get a mention in my Blog post about creating with WP.
I should add that I did create php pages in the folder before I knew anything but again I've learnt plenty in that regard as at the time I didn't really know how WP worked so I created the usual pages of Index, about and contact. Then I found out how the Index page was used, why there is a font-page.php and about creating additional pages which is where I am now. I already had my website, the one I'm playing with, broken down into body, header and footer using the PHP Includes function ( I found out about that because I was updating every page. I had worked with SQL and learned to break things down into smaller pieces) so I just had to copy the code from one page (existing) to another(new) and change paths to images etc. I'm now getting exactly what I WANT from a WP Theme. I and having to work as cheaply as possible as this does cost but I've learnt to keep my costs to a bear min.
it doesnt help if i know absolutely zero about php, no explanation really when one is a newbie
Wow. The simple things but that shortcut in Sublime really impressed me for the HTML scaffold
it also exists in vscode as a function of Emmett
function load_css()
{
wp_register_style('bootstrap',get_template_directory_uri() . '/css/bootstrap.min.css',
array(),false, 'all');
wp_enqueue_style('bootstrap');
}
add_action('wp_enqueue_scripts','load_css');
its not working
Wow.. wonderful series. Please upload rest of them. It would be helpful if you could include links (WordPress documentation) that you are referring in the video. Your way of explaining things is good. Thanks. Lots of Love
Thanks Premnath. i am working on it as we speak :) Cheers
If I stop this video at 18:27 min. I see that there is a element with a '.container' class, and an element. I checked and rechecked several times, this video and the previous video. But I couldn't figure out, exactly at what point and in which file the above 2 HTML elements were added. Could somebody point it out?
Same
I had the same and later discovered that I had forgotten to change the home page to static, that resolved it. Probably too late now as it was a year ago but it might help someone else :)
@@pcbluespcblues Doesn't solve it for me. The actual page doesn't show up despite having that DIV container and H1 tags there.
Your english so fluent and clean.
I bought a UDEMY course in my native.
That was so fucking feckless.
Please add somewhere in your channel a "Buy me a beer link."
Huge thanks.
Thank you so much, you mention in the video you provide the handbook for help if possible please put it in the description. Again Thanks.
Thanks for errors you have done, i learnt more by them
Thank you very much for producing tutorial videos.
In sublime text nothing happens when I type html:5 and press TAB.
Hard lesson learn check for spelling errors I spent way too long looking at the code to only realize I forgot the s in the functions file name. Thank you for the tutorial.
When I first did this I excluded the s on functions omg I spend hours looking at spelling came to find out it was missing the s 😅
Same here 😂
Thank you so much. I truly appreciate all the hard work you are doing to help us. Thanks again. I am learning a lot.
You are very welcome mate!
Thanks a lot for your tutorial. You're really talented in teaching
Thank you :)
So easy to follow, great tutorial . two thumbs up :)
You're welcome, cheers!
Hello! Thanks for the serie of videos
Thanks mate really appreciate the comments. You can see all the docs here: developer.wordpress.org/themes/getting-started/ But they are a bit painful :)
Thank you very much for the tutorials so far. I have a query. The html:5 the tab doesn't do anything for me on sublime text, i also tries CTRL+SPACE and that just gave me 'No available completion' on the bottom left. Is there any way of fixing this?
how did you solve it
for me I just type html+tab works fine
Thank you man!!! :D I am quite fond of this series!
Thanks Timo. Glad to be of assistance :D
Awesome tutorial. Appreciate this!
you start a awesome series
please complete this series
Thank you Ziu, appreciate it, I will 100% complete this series.
Great tutorial, Sean. I am following along with Dreamweaver. With the add_actions I get the following: "Uncaught Error: Call to undefined function add_action()". However, everything works in localhost. I would be curious to know why this is happening.
Hey Phillip - thank you! If you can paste some of the code I can help you debug it :) Cheers
I'm stuck getting the bootstrap.min.css to load even though I am getting a path returned from the get template function: get_template_directory_uri() I've tried hard coding it but so far bootstrap links don't populate. Anyone have any ideas?
delete all in function.php and copy my code in there
@@RyanSamir nope the same im stuck too!
@@dardi1fan20 Having the same issue for hours now. bootstrap and js wont load. I deleted everything in the functuions.php folder and just left his code in and still nothing , please help
@@RyanSamir My bootstrap and js arn't loading into the page either, tried deleting everything and just using your code, still doesnt work. Can you please do a troubleshoot or work around of some sort? thank you
I have followed your steps.. But why bootstrap.min.css and bootstrap.min.js is not showing in view source page. I stuck Please help me.
@@RyanSamir I did copy your code but nothing showed up either
Exactly what I was looking for. Thanks for the easy to understand tutorials! Will follow your future videos too. You earned a new subscriber :)
Amazing tutorial man.
hey mr digital its seems to be that that the html scaffold dosent work with the shortcut for my sublime text(html:5 and tab) if you could help
same for me ,when i type only html and hit tab it works but its not the right scaffold on the other hand html:5 and tab wont work
Great series, explain everything he does, best way to learn WP development. Do you have more courses?
Changes I make to the theme in sublime show in the WP dashboard, however not the other way around. For example, I added pages in wp, but they do not show up in sublime text (code editor). How do I sync or fix this?
Great tut's BTW (kindest thanks)
Thank you Mr. Digital!
I do have a query- what if I have my custom css file?
Can I used the; get_stylesheet_uri function?
My custom css is in my folder in a file of its own.
Could I do like
Wp_enqueue_style('custom-style,', get_stylesheet_uri());
Hi. You can do this: wp_enqueue_style('custom_style', get_template_directory_uri() . '/your-folder/your-stylesheet.css'); As long as the custom css folder is in your theme folder.
@@mrdigitalau thank you sir kindly from Mexico.
I did it and works but im having issues with my custom Javascript too ill do the same instead of style ill used script.
Thank you. I'm really like it the ACF series
When you type the html:5 and press tab, if it does not work, it means the sublime text doesn't have HTML 5 installed. So all you need to do is:
1 Go to Tools--->Install Package Control
2 Then Go to Preferences--->Package Control--->Install Package
3 Wait sometimes and type HTML 5
Done.!
Let's Rock The World.! Join With Me
Hey man. Just wondering, how do I open the file without going through the initial process of laragon (the part where the blue link is conveniently presented after a brief installation) and how do I get the test pages to open.
thanks a bunch
I forgot to activate the theme.
Not showing on source code:>> bootstrap.min.css
Bootstrap 5
wp_register_style('main', get_template_directory_uri() . '/css/bootstrap.min.css', array(), false, 'all' );
wp_enqueue_style('main');
Thank you so much for your work. You don't need separate jquery enque. in
'wp_register_style' dependency list should be an array ( ['jquery'] ), you just did that small mistake.
Thank you.
Please could you clarify as your sentence doesn't read well - is this something we need to know? And why? I am beginner at this and your comment looks like it is important but Mr Digital didn't answer you so is it something that will cause problems later? Thank you
@@aletheialouise
wp_register_script('bootstrapjs', get_template_directory_uri() . '/js/bootstrap.bundle.min.js', ['jquery'], false, true);
the statement above works without separately queuing jquery. It loads jquery before bootstrapjs. Third argument of wp_register_script is dependency list (it's an array not string), and that was the small mistake. Please read the documentation.
@@a_rob Thank you, I'll go and read up on this.
Hi Rob,
I have tried your method with the js bundle, as Mr Digital his method. Both are not working for me, jquery is not loaded.
@@minQkel Rob's method works for me
excellent tutorial! Well done!
Thank you Bassel!
i am having a minor issue yours at the end of the lession shows Home text mine doesnt and anything i create on the page doesnt display the code is Identical to yours i even did the checks so confused
Hi mate, what part of the video (mins and seconds) are you referring to? Cheers
@@mrdigitalau I figured it out watching the next video in the playlist you showed your code for the Home page in the beginning. it had the tags which some how i missed while following along in the prior vid. not sure how. so the Home wasnt showing on the web page after the lesson ended like yours did :) but i got it had a feeling a line of code was missing somewhere. thank you for replying :) Love your Video i have wanted to learn how to scratch Build for a long time. been using things like elementor and miss the old days of just html and css :) now to make my own Themes :) TY again for your time and your Videos :)
@@silverlanswoodworking I'm not sure have you already solved your problem? but I try to add this function between function "get" on the front-page.php then that worked
Cheers guy
@@NooMJeSWanG yes after watching the second video your code changed from the ending of the 1st part so you must of did an edit off camera. I havent worked on the project in a Long time i mean i posted 7 months ago lol and life hit us pretty hard after that. hope your safe btw :) all the best keep up the great Videos :) i still watch even if i cant code right now. from Viruses to deaths to riots to storms to tornado's can this year just stop lol
great series
im using the latest wordpress and somehow the wp_footer doesnt want to show the javascript, is there any solution for this ?
Great tutorial but what if i want to use pure vanilla CCS3 instead of bootstrap on functions.php?
Hi there, thanks for the tutorial. When I add function get_header(); it gives me an error undefined function call, please tell me how to solve this problem, Regards
if you find any answer kindly share here..
@@bhupendrashekhawat9185 do you have header.php??
How come at the time around 17:40
I saw a "Home"
Are you type in manually? or generate by code?
Yeah it doesn't make any sense. I think is stopped the video once maybe.
i also noted the point. will it matter ????
For some reason the get_header function is not working, I do not see the text of the header file at my front-page.. How can I solve this?
i do everything like you do on the vid, but when i see my page source there's no jquery.migrate.js, and can i know why was that happen? and what the impact of it?
@Mr Digital, ihave a problem, my bootstrap.min.js is not present on my footer source code, jquery and bootstrap.min.css are here in the header but not the js part of bootstrap, i don't understand why.. her is my code:
function load_js() {
wp_enqueue_script('jquery');
wp_register_script('bootsrap', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery', false, true);
wp_enqueue_script('bootstrap');
}
add_action('wp_enqueue_scripts', 'load_js');
Can you help me please ?
Hi, I've been having trouble with my enqueued style sheets. If i modify them the changes never take on my theme. I've cleared my cache and history, still nothing. Anyone have the answer to why i can't make changes to my css files that i have enqueued?
I wrote the code in function.php, but when I open view source, there is nothing about bootstrap. Can anyone help me?
on minute 6 you can seee the bar tool why i cant see it any solutions
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in C:\laragon\www\test\wp-includes\class.wp-dependencies.php on line 312
There has been a critical error on your website.
please explain! this error came up after loading the site after load_js function
I tried editing wp-config.php by adding define( 'WP_MEMORY_LIMIT', '256M' ); and the error is still there
I believe the admin CSS is overwriting my main.css stylesheet. Possibly because of the new versions of wordpress. When I go to the site incognito the main.css looks correct (as I am just a visitor and no admin bar comes up). Anyone else having this issue and know how to fix it?
Where do you get this handbook from?
Front page works. Adding a page 404 error, but then it started sending me to my Xampp dashboard. I know you're using Laragon, but should it matte? What am I missing here? I have all the php files you have, the front page is fine, the styles are working.
Thank you for this video!
Hi there! Very good content. But before I start doing it on my WP site, I need to ask, does this still works the same? Thanks in advance
Damnit...I liked his "fooda"-calls :)
I received your feedback, with many thanks! appreciated indeed.
You're welcome. Make sure to double check spelling of the template names, if they are not right then it will not detect it, it is a simple mistake. Cheers
@@mrdigitalau Appreciated and many thanks again! enjoying your course indeed.
My bootstrap css and js not included in... i did exactly as you did
Great course so far @MrDigital. Question to you or anyone... My code is equal to yours through 17:26, but my bootstrap.min.js is showing up in the body and not the footer. In fact 'nothing' is showing below the tag. What could be wrong? Here's my code block:
function load_js()
{
wp_register_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js' , 'jquery', false, true);
wp_enqueue_script('bootstrap');
}
add_action('wp_enqueue_scripts', 'load_js');
Really Your Video Is Very Cool,,,Overall Fine,,, I hope, You complete this Course,,,First To Last
Hey mate, thank you very much! I Will definitely be completing this, I am creating some more videos today! Cheers
Inserted the HTML in code in header and footer files, closing code in footer, also insect source did not display the code as showing here at the stamp time: 3:55 mints. could u plz share email or any other way to share my screenshots with you,, to make sure that everything was implemented correctly, but not seeing the same results, I stuck at here... by the way, I have another local server installed on my machine: Local by flywheel, do you think this is what creates the confuse of server at laragon server? shall I delete the other server? just additional info to make an assessment of the situation,
just marvelous.
Hiya on the last step I get a fatal error saying the allowed memory size has been exhausted. Does anyone know a fix for this? I will go through and check the code but I am fairly certain I have followed every step. Cheers No worries just made a mistake have fixed it now
sorry just made a silly mistake... all sorted now
I am stucked in this video as my bootstrap didnt show on my site. and I am watching and at the same time doing it. but bootstrap doesnt show in the view source :-( i dont know why. it seems i did correctly base on this video.
Hi, Are you sure you 100% copied the correct commands as they are shown in the video? I had the same but turns out I had a typo aswell.
At 17:36 theres a moment where you have a container and h1 loaded in. That is not happening for me whatsoever. why would this be?
Nevermind. I noticed when you cut out to the next segment about jquery, you had the front page file open and must have added the following:
Home
I added this, and it came up as yours did.
Really appreciate this thanks. Have you thought about doing this kind of tutorial series but using WordPress with Tailwindcss? If so that would be amazing.
Hey Luke, sorry, it's been a year.. haha. Still haven't gotten into Tailwind but will soon and hopefully post something up. Cheers
Great content Mr. Digital. Not many on the internet who teach as deep as you on Wordpress development. Keep going.
One quick question. Bootstrap files are showing in the header section when I 'Inspect' in dev tools, but not working everywhere. Any suggestions?
Hey Rajdeep, thank you! Sorry can you clarify what you mean about bootstrap files not showing? Are they not loading ? Is that what you mean?
That's a really great tutorial, but I have got some issues regarding "get_template_directory_uri()". That function didn't get me the current path:, Can you help me with this?
Fatal error: Out of memory (allocated 593494016) (tried to allocate 262144 bytes) in C:\laragon\www\Wordpress-Test\wp-includes\class.wp-dependencies.php on line 315
I don't know why but my homepage doesn't work ? the other pages works well :)
I have followed the exact same steps but I lost you at 6:05. The Admin bar will not show up, any idea why that may be the case? Great tutorial so far btw!! Thanks!
Hey mate, admin bar not showing up means your footer does not have -- check if it is there..
@@mrdigitalau it still doesn't show up :/ and it's included in my footer
Unfortunately,,, there was an error message displayed in the main page: Warning: Use of undefined constant fasle - assumed 'fasle' (this will throw an Error in a future version of PHP) in C:\laragon\www\test\wp-content\themes\mytheme\functions.php on line 6
it should be false instead of fasle
@@ДмитрийОвчинников-ъ8ш I fixed, but the solution was not that really the error, after posted the error message along with the whole screen of functions.php = in one forum someone told me to remove bootstrap string in the second line to load , after removed that worked properly, but stuck for long hours searching,, posting,, asking,, including wordpress help forum themselves they did not realize where is the error that causing the trouble!
Thanks for the series - enjoying it! What happens if we don't enqueue jQuery, will it break plugins? Or do other plugins automatically enqueue jQuery for you? And if “yes”, is it possible to have enqueued jQuery more than once? (Don't want to create too many HTTP requests)
Hi, sorry for the late reply. With WordPress, jquery is important because many plugins use it. It won't enqueue jquery more than once, which is great. When enqueuing your stylesheets, you can put a dependency in there for jquery and WordPress will automatically add it before that script. eg. wp_enqueue_style('test-script', 'script.css', ['jquery']);
The text in the front page: This is the front page - did't displayed, even tried to insert php code still not displayed,, checked the source code as well,
is the file called front-page.php?
@@mrdigitalau Yes,, exactly
@@almadarplus Did you create a page and set that page to be the front page in your WordPress dashboard?
@@mrdigitalau YES,, everything done perfectly as said,, I double-checked this again and no any missing part at all,, confused where the wrong is? where is the missed part? I want to send you a screen shot from my dashboard,, but dont know how to this? bytheway, thank you very much for your quick replies, really appreciated
@@almadarplus same issue created a home page in Wordpress and the correct spelling of pages. I did noticed it appeared on the front page but when I placed the get footer and header nothing showed anymore
I don’t know if that’s the new wp version or bootstrap but this method does not work for me! I use bootstrap 5.2
Hi Moe, what method specifically are you having problems with?
Followed every step, and suddenly my admin bar is missing. Checked page source and it's mysteriously gone. What did I accidentally delete?
Hey mate. Typically admin bar missing would be that you have no in your footer.php. This is what calls all the JS that admin bar uses. Check that. Otherwise it's your User settings in Wordpress, you've disabled the admin bar to show. Good luck!
just in case anyone was getting an error from laragon - make sure to have the correct spacing in your code --->
It didn't work for me. I tried different spacing.
Thank you very much for sharing your knowledge. I am realy - beginner, and a little bit confused with bootstrap instalation. Maybe it is a bit different with v. 4.4.1 of Bootstrap, because I can't see bootstrap in my code sheet. Neider, jquery, and in later videos main.css file. Can you maybe see, what I'm doing wrong? I have checked my function.php file many times :-(
Sir, you might be overseeing the problem. Make sure its "functions.php" Not function.php
I had the same iesue. Hope this fixes everything on your end.
@@Eggsec Thank you very much! :-)
@@Eggsec Thank you =))
followed all steps clearly everything is fine, but can't see any text displayed in php files, any solution for this???
Send a screenshot to sean@mrdigital.com.au - are you doing this locally or on a web server?
@@mrdigitalau Locally, as explained,, I will share my schreenshots via email shortly, thanks
Thank you so much for this videos, they are absolutely useful. I've always had a doubt about theme development: security. What can we do in order to make the theme we are developing a very secure one? I try to look for information everywhere, but I couldn't find anything. I am not very sure about security issues and that kind of stuff. Thanks again!
Hi Alex, when you say security what are you specifically referring to? What are you trying to keep secure on your WordPress theme? WordPress is already built as a CMS for security, however, plugins that are poorly developed can sometimes be found to have security holes. A wouldn't think a theme could give you issues with security, especially the way we're building it (with minimal plugins) :)
Hey so i got this error when enqueuing javascript:
Parse error: syntax error, unexpected 'function' (T_FUNCTION)
this is my code:
function load_js ()
{
wp_register_script('uikitjs', get_template_directory_uri() . '/js/uikit.js', '', false, true);
wp_enqueue_script('uikitjs');
}
add_Action('wp_enqueue_scripts', 'load_js')
Hey mate you can't have a space between load_js and (). So make it function load_js() . Also it is add_action not Add_action.
Hi , am getting error when after trying to enqueue scripts . This is the error
Maximum function nesting level of '256' reached. Pls help
Hey mate, you will need to paste the code for us to see what the error is- this sounds like a menu issue. How many items are in your nav menus?
Thanks for the video. part 3 done :-)
Hello teacher
we are in 2021 can i use bootstrap v5.0.0-beta2 for wordpress theme ?
Of course you can mate. Go for it. I use it myself :)
thank you for your reply
When I view source, "bootstrap.min.js" isn't loading or anywhere in my source code. Any idea why? It's installed in the theme directory. Here's my source code for functions.php:
pastebin.com/DP751H9x
the bootstrap.min.js will load with the get_footer(); function in the front-page file.
How to we remove the junk that comes with wp_head() - emoji styles and scripts, the generator meta and the other link tags?
There are some filters for that. I might do a video on this mate.
@@mrdigitalau That would be great. Also the new WP5 adds some styles and scripts for the block editor. If we don't use it, it's better to be removed.
For Future References, You can now just enqueue it directly your scripts and styles using
wp_enqueue_script *//_style for stylesheets*
(
'bootstrap-js', *//stylesheet/script alias*
get_template_directory_uri().'/js/bootstrap.min.js', *//directory location (still use get_template_directory_uri()) -- for the stylesheets you can stop here.*
array('jquery'), *//array of dependencies*
false, *//string or boolean for version*
true *//boolean for script location (footer/header)*
)
I have problems. Not getting bootstrap in the sourcecode. I have checked it a 1000 times and cant get it to work. I have followed your instructions step by step. Here is my code:
10:17 but there is no 'bootstrap.min.css' file in that folder?
There is. its the 3rd file in the folder. He just doesn't have file extensions set on his windows explorer so you won't see the .css at the end
@@viewtifult Oh, thank you for the info. It got me confused for a moment.
@@kornelijekovac9793 No Problem at all!
I am getting stylesheet missing in WordPress- any help? thx
Thank you !
Nothing is working....
You're videos are great, we should be paying to learn all these. Thank you for making them free.
I've a small problem. I'm using VSCode as my compiler and i cannot run PHP code without downloading XAMP, VAMP or similar applications. is there any way you could suggest me without downloading any applications other than the Laragon?
You need an apache Server running on Unix based machines
you are the best
Thanks Amine, all the best mate
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in C:\laragon\www\blog\wp-includes\cache.php on line 126
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
If you encountered this error the solution is down here
add_action('wp_enqueue_scripts', 'load_js');
Delete the "s" from wp_enqueue_scripts should me wp_enqueue_script
deleted the other server (flywheel), but still no result.