The best websites provide means for their users to shape a custom experience, allowing them to interact with site content and components in the way that they want to. In this recipe, you'll learn how to create a drag-and-drop interface for site components. You'll let users order your content in the way that they want to experience it, letting each individual user decide what is most important.
To start, you should have a basic theme skeleton created with at least a style.css
file, and an index.php
file. For this recipe, you'll create a custom page template to demonstrate the technique, so you should have some knowledge of page templates.
The first component of the drag-and-drop interface you're going to create is the custom page template. Create a new file in your theme's directory and name it category-overview.php
. This template will display the six most used categories with up to five posts for each. It will let the visitor...