Friday , 23 June 2017
Home / Programming / WordPress

WordPress

Conclusion – WordPress Theme Tutorial

Conclusion

Congratulations! You now know how to create a WordPress theme. Of course, your journey isn’t over yet. You should take it to the next level by learning how to create Plugins. You should understand that WordPress offers it’s APIs for both plugins and themes. For a list of WordPress’s APIs then click here. http://codex.wordpress.org/WordPress_APIs While we didn’t cover these APIs, …

Read More »

Custom Templates – WordPress Theme Tutorial

Custom Templates

By creating our own templates for certain pages, we make our theme dynamic and flexible. Though, in some situations you’ll want to create a template that WordPress isn’t aware of. For example, our page template is one way to display a page, but what if we wanted a full width page instead of one with widgets. We still want to …

Read More »

Error 404 Page Template – WordPress Theme Tutorial

Error 404 Page Template

Creating your own custom error messages in WordPress is easy. We’ll be creating a template for our 404 page. Create a new file called 404.php and add this bit of code. [crayon-594d4eb31b10b737629828/] Try visiting a random page in your blog and you should see this message appear. Very simple right? WordPress will automatically look for this page when someone visits …

Read More »

Single Post and Page Templates – WordPress Theme Tutorial

Single Post and Page Templates

WordPress is pretty smart when it comes to knowing what pages to use. The only template file you need is index.php. While it works great for our home page, it doesn’t work so well for displaying categories, archives, pages, and single posts. You can actually create a template for those pages. Before WordPress decides on what page template to use, …

Read More »

The Loop – WordPress Theme Tutorial

The Loop

In this tutorial, we’ll be discussing how to use the WordPress loop. The loop is PHP code by WordPress that displays posts for us. It’s quite simple to use and it gives us tons of information about a post. It allows us to display and format posts in any way we want. Let’s open up our functions.php file and add …

Read More »

Creating Widget Areas – WordPress Theme Tutorial

Creating Widget Areas

Let’s start creating widget areas in our WordPress theme. We will have a total of 5 widget areas. One will be our sidebar and the other 4 will be put in the footer. Creating a widget area is very simple. Registering A Widget Area Open up your functions.php file and add this bit of code. [crayon-594d4eb31caf0814985423/] The register_sidebar() function is …

Read More »

WordPress Theme Menu Support

WordPress Theme Menu Support

Having a dynamic theme is important. It allows the user to customize  your theme to their liking. In this tutorial, we’re going to learn how to add WordPress theme menu support. This will allow our users to change the items in the menu with their own titles and links. Adding WordPress Theme Menu Support Before we start displaying the menus, …

Read More »

How to add JavaScript in your WordPress Themes

How to add JavaScript in your WordPress Themes

We have some javascript in our theme. So, let’s learn how to add JavaScript in your WordPress themes. It’s very similar to adding style sheets to your theme. Adding JavaScript Open up your footer.php file and add this line of code right before the closing </body> tag. [crayon-594d4eb31efbb256464636/] Just like our wp_head() function, this gives developers access to add their …

Read More »

How to add CSS in your WordPress Themes

How to add CSS in your WordPress Themes

While the content is displaying, it isn’t stylized. So, let’s fix this with some simple functions. First off, we’ll need to create a new file called functions.php. Functions.php WordPress allows you to modify the way it runs by using the functions.php file. If this file exists in your theme and your theme is currently activated, then WordPress will load this …

Read More »

WordPress Template Footer – WordPress Theme Tutorial

WordPress Template Footer

We’re now going to discuss how to create a WordPress template footer. The process is very similar to headers. Creating The WordPress Template Footer Create a new file called footer.php. Cut and paste the following code from the index.php file to the footer.php file. [crayon-594d4eb320f04418762416/]   Just like the header file, we want to use only the part of the page …

Read More »