Here I show you how to turn the basic HTML and CSS site we made previously into a WordPress News Theme.
This WordPress Theme will make for a very professional WordPress Site. It can also serve as a starting off point for another Blog Design.
All of the Code is Here: http://goo.gl/NYCUW
source
wordpress firewall is the plugin to get. As per the picture, make sure it has permission to show on the web page
I'm unfamiliar with a firewall plugin. I actually have experience securing a small VPS, and fiddling around with CloudFlare/Dome9. Oh, I did installed WP Security plugin.
P.s. The default picture isn't showing up in catch_that_image. It's probably a localhost error? The function works, but doesn't show a default picture.
You're very welcome π If you add a firewall plugin to your wordpress site, you shouldn't have to worry about security. Just make sure you don't provide people with any way to access your database and you'll be fine
Oww, I wasn't even thinking about that yet. I was more worried about it doing something of the unknown. We all know how computers can act… Thanks a billion and one, keep up the outstanding work!
That is just some custom php code I put in there to limit the size of the excerpt. I wouldn't worry about using it because there definitely isn't a security hole there for using it.
I kinda get it; I don't understand where you got/made that variable, "$ntt_the_excerpt". In a couple of videos back you said, "It's frowned upon to change global variables". So now I'm looking for alternative ways. I end up landing on the WordPress codex, and found a function limiting characters with the_excerpt(); using the blankslate theme.
Thank you very much π This is the code that handles the excerpts $ntt_the_excerpt = $post->post_excerpt; echo substr($ntt_the_excerpt, 0, 50); It basically spits out an excerpt with 50 characters. Please elaborate on your $wp_query question. I'll try to help
Long time fan, first time poster. I would like to start by saying thanks for your hard work. Some people are just natural teachers. I can't begin to tell you how much I learned! Keep on truckin – as if you would ever want to stop truckin! Here's a semi-student review; at this point I'm still having trouble echoing excerpts with character limits, lol… I also have one desperate question. Is there any other methods around $wp_query = null;
Yes the editor can get buggy every once in awhile. The same thing happens when you access the files over ftp as well. Keeps life exciting π
I found the second thing that wordpress does not like more then white space is cutting and pasting code into it. After I typed in the code it worked fine.
Did you notice that there is a " in a weird place? That looks wrong
I am following your video and copying the code as you type it in the video, but I found what it does not like.
$wp_query->query(βposts_per_page='5''&'category_name=Featuredβ);?>
it does not like the & if I remove that and just have it as $wp_query->query(βposts_per_page=5);?>
it works fine.
Good way to learn that is for sure.
Have you tried using my exact code? I'm not sure if you may have changed anything. I just checked and the theme still works. It is normally best to download all of the code and then check as you make changes. WordPress can get kind of funny, but I didn't touch any of the core WordPress files so upgrades they make should have no effect. Sorry this isn't working better for you π
I am stumped again, when I add the database code as you do, the page does not load, there is nothing there at all, just blank. When I remove the database code it loads, what is causing this?
@Chibiwawa I emailed you my answer. If you perform a replace on the backquotes with normal quotes everything will work
When I copy the code you give for the first image thumbnail in functions it causes a php error at line 21: $output = preg_match_all(β//iβ Why would this be? I notice in notepad+ that everything is grey after that line . . . not a good sign. I did copy it to notepad then to notepad++.
@jsfaulds You're very welcome. There aren't many people watching these tutorials, but I thought there needed to be a series of tutorials on how to make a WP theme from scratch.
Derekbanas, thanks for the tutorials
I, and I guess many others appreciate the time and effort you put into them.
It's refreshing the straight to the point style you produce.
Cheers, John
@MikkelGPro Thanks! I have a bunch of WordPress tutorials planned. I'll cover everything
YouΒ΄re making very excellent tutorials π hope you keep them up!
best WordPress tutorial I ever watch. and keep up the awesome HTML to WordPress tuts.
thank you very mutch
go a head
very good tutorial
thanks