Web Design Tips, Tutorials & More!

Know the Common Functions of WordPress

For many people, the way to get yourself online is going to be the WordPress. It’s an easy platform to use and getting online can be simple. If you take the trouble to actually learn what you can do with it, you will get enhanced results. There is very little if anything that you can’t do with it but results will be better if you learn your way around.

If you want to look at how it works prior making a website and uploading to your host you can install a server on your computer and then load WordPress.

Use one of two server packages both of which are available for download. Xampp is one and WampServer is the other.

The components of WordPress are all part and parcel of how WordPress themes work. Getting to know the actual components will enable you to build your own theme rather than rely on a free or paid one which you then have to modify with plug-ins to make it work the way you want. The codes that are built into the functions on WordPress can be extended to your needs with only a snippet of code here or there.

Let’s look at some of the basic function and then take them one at a time.

  • Navigation
  • Page Listing
  • Excluding Pages
  • Including Pages
  • Sort Pages
  • Depth Specification
  • Display Menu

Navigation is one of the fundamental functions on any website or blog. Word Press has recently introduced wp_nav_menu when they brought in the WordPress3.0 platform. This is a new way of using menus that is neater and faster.

There are a few terms on WordPress you need to realize have different meanings. A page is like a book page, and a post is the writing you put on it. If you are going to list your pages by default it will list them all in alphabetical order when you use the function wp_list_pages. You can also list them by their ID’s with just a (,) in between by using the code as below.

However, should you have a whole lot you want to list, and you just want to leave a few out, its easier to use the exclude.

You can change the way your column is sorted by changing the values in the parameter.

If you want to sort by date you would use the code below:

Your pages can have additional pages attached in the form of subpages. These subpages can also have subpages. This is regarded as the depth of the site and works well if you use a drop down menu that has submenus. For example;

WordPress Wp _ nav_menu should be enabled for your themes functions, which you do by adding a line of code in the functions.php

In addition to this, you will need to add a line in the area you want your menu to show. If it is to be placed in the header add it in the header.php just change the [Menu Name] to the name of your menu.

Go to appearance> menus and add the same name there. Now you can complete the process by dragging and dropping the names in place.

You have now learnt how to set up your menu with the basic WordPress functions.

Leave a Reply