-
WordPress Themes vs Plugins and the single responsibility principle
Have you every thought about what should go into a WordPress theme and what should go into a WordPress plugin? This is a question that I for sometime have been thinking reading about. The WordPress codex has the following definitions: ”Fundamentally, the WordPress Theme system is a way to ”skin” your weblog. Yet, it is more than just a…
-
How to build a WordPress query for the Loop
Have you ever need to generate a wordpress query to be used in the loop but you have not been really sure how to do it? Try using the WordPress query generator it might help you get going!
-
Creating a single file WordPress plugin in 2 steps
To create a single file plugin in WordPress is really simple. Following the steps below should leave you with a single file plugin that is ready to be filled with valuable functionality. Create a new PHP file with a name derived from your chosen Plugin name and store it in the wp-content/plugins directory, e.g. ”wp-content/plugins/FooBar.php”.…
-
Can’t upload images?
Have you tried to upload images to your newly installed WordPress site and it didn’t work? Here is how I solved it! It turned out to be really simple… I simply added a uploads directory in the wp-content directory, i.e. \wordpress\wp-content\uploads. If this didn’t help you can try to change mode to 777 on the…
-
Unit testing your WordPress themes and plugins
WP tuts has created an interesting three part tutorial on how to use test driven development when writing themes and plugins for WordPress. The first part introduces the concept of unit testing and it explains what is needed to be able to write unit tests for WordPress. The second part continues by introducing how to write a testable plugin…