A navigation menu is one of the most important parts of any website. It’s placement and content are key to ensuring that your visitors can access the information they need easily without searching far and wide. Luckily, WordPress menus are super easy to access, edit and customise. Once you know how, it’s pretty simple.
In this tutorial post, I’m going to cover everything from how to access your menus, adding, editing and deleting menus, and even how to create a multi level drop down menu for your website. So continue reading if you are in need of an easy to follow guide on WordPress Menus.
Declaring a Variable
Before we can use a Variable, we must declare the variable. We do this by typing the keyword var followed by the variable name.
Initializing a Variable
Once we have declared our variable we can then initialize it with a value by typing the variable name followed by a = symbol (assignment operator – more on this will be covered in future posts) and then the value you wish to store in that variable:
var myVariable1 = 5;
Let’s break that down:
var (declaring the variable) myVariable1 (variable name) = (assignment operator) 5 (value);
We can have multiple variables like so:
var myVariable1 = 5;
var myVariable2 = 3;
var myVariable3 = 2;
This is where my #BreakingJS journey begins and I’m equally excited and scared. So without further ado, blog post number 1 is an introduction to JS for those (including myself), who don’t really know what it’s role is in the development world.
If you are wandering what #BreakingJS is all about, check out the debut post here which explains what it is I’m doing.
One thing before we continue:
In order to learn JS, you should already have knowledge of HTML, and if you have CSS too then that’s great. These three languages are important when developing websites and all work together to make your website look and work correctly. If you don’t have a working knowledge of HTML and CSS, then put JS on hold for now and tick those two languages off first.
Here is my analogy of how the three work together using the human face:
HTML (The Face)
The content and structure of your face (website) and how it is laid out. It creates the position of your eyes, nose and lips (sections within your website that you can create using DIV’s etc).
CSS (The Makeup)
This adds makeup (style) to your face (HTML) structure and generally makes it look pretty (or not), depending on how good you are at applying makeup.
JS programs your face (website) so that you can speak, see + hear (submit forms, display interactive galleries, play games).
I hope this makes sense and you enjoyed my artwork 🙂