One of my friends told me wanted to learn how to develop for WordPress. My reply was it’s very easy just go to the codex and start. Having said that and having sent him on his merry way. I realized maybe I have sent him on the wrong path, while the codex is the holy…(Continue Reading)
Category: Wordpress
Custom Post Type with Custom Meta Boxes Part 1 of 2
First lets start with registering a custom post type, to be used at our discretion.There are 5 basic post_types that comes with wordpress these are not to be messed with. They are : Post (Post Type: ‘post’) Page (Post Type: ‘page’) Attachment (Post Type: ‘attachment’) Revision (Post Type: ‘revision’) Navigation menu (Post Type: ‘nav_menu_item’) If…(Continue Reading)
WordPress Backend: Add Custom Field to Users Page
So this is to add a custom field to your wordpress users page on the admin side. For well a plethora of things come to mind, if you want to show custom usermeta and make them editatble on the back end i’m guessing this would be pretty useful no? Ok the first part the function…(Continue Reading)
WordPress: Making Ajax Calls
Just Like i promised, today we will cover making Ajax Calls Well lets start with the basics shall we? Each request needs to supply at least one piece of data (using the GET or POST method) called action. Based on this action, the code in admin-ajax.php creates two hooks, wp_ajax_my_action and wp_ajax_nopriv_my_action, wheremy_action is the…(Continue Reading)
Sync Roles of Multisite Users
So this happened at work today, was working on a multiste and the client required that under a certain condition. For now lets say the condition is that I’m subscribing to the site and for 5 days i’m a free user on the 5th day i need the client to revert to role => unpaid.…(Continue Reading)
Understanding The WordPress Template Hierarchy
Template Hierarchy: 1) Which template files will WordPress use when it displays a certain type of page? The General Idea WordPress uses the Query String — information contained within each link on your web site — to decide which template or set of templates will be used to display the page. First, WordPress matches every Query String…(Continue Reading)
How to use PHP Data in your Javascript files for WordPress
WordPress makes it spectacularly easy to transfer data to you javascript files if you’re unfamiliar with enqueuing scripts then please refer to my previous post. Here it goes then. Say you want to do something “fancy” like ajax calls from you js files. I’m starting to get a little off point here right now i’d…(Continue Reading)
Correctly Enqueuing Styles and Scripts in WordPress
Understand how to and more importantly why to register and enqueue your scripts and stylesheets in wordpress. If you do that then you’ll begin to understand the power and ease with which you can do much more creative things and create interactive webpages