• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

WordPress Programmer’s Homework

Here are some test assignments for any PHP programmer who want’s to learn WordPress programming. It’s not a step by step guide, but something we used for our junior programmers. Basic programming skills and advanced Googling skills are a prerequisite.

Part 0.: Install your own localhost web hosting environment

  1. Grab XAMPP (Windows) or MAMP (OS X), see where your web root is and how to connect to database.
  2. Install your WordPress.
  3. Import the test content by following step 1. and 2. here: Theme Unit Test on WordPress.org

Part I.: Template programming

  1. Use add_action to add some HTML to your site footer. Use the functions.php file of your theme.
  2. Add a new function to your template which will list all the articles with a specific post meta. Use WP_Query to do it. You can simply output it in header.
  3. Add code to show the featured images for the articles in archives.

Part II.: Processing posts

So you have your site with a couple of posts now. It’s time to try processing the data by some simple scripts. This is something you might need a lot whenever you work on some site conversion or change the structure of the website.

  1. Create an external script which loads wp-load.php and then uses WordPress functions to do a string replace in each post content. The script should not be a plugin, just create a PHP file where wp-load.php is, include it and then you can use global $wpdb; and all the WordPress functions and so on.
  2. Create an external script which assigns a given category to each post. Make sure you use WP API calls and not SQL.

Part III.: Build a plugin screen from scratch

You might build a plugin sooner or later, this might come handy:

  1. Start by creating a new plugin. Wrap it all into some class.
  2. Use all the WP API functions to create a new WP Admin Dashboard menu item which will show your own screen.
  3. Put a simple form which stores a wp_option to this screen. Make sure you follow WordPress HTML when you build the form – get inspired on Settings -> General screen.
  4. Use WP nonce security for checking of the form submission.

Part IV.: Get to know jQuery

Go through the jQuery lessons, for example here: jQuery Tutorial on w3school.com

Assuming you know something about JavaScript already, you don’t have to read it all, just have a look at the “Example” sections which all contain “Try it yourself” links and if you are not sure about something, then read the text above it.

Also have a look at the left-hand menu which covers different aspects:

  • jQuery Effects
  • jQuery HTML
  • jQuery Traversing
  • jQuery AJAX

You only need to know basics of each of these. Once you get the basic idea, it’s easy to dive into it when needed and figure it out.

You can use all that knowledge in WordPress, with exception that jQuery is called via “jQuery” and not “$”.

Also the jQuery is enqueued in a different way. You don’t put <script src=”…jquery.min.js”></script> into header, but you use wp_enqueue_script(‘jquery’);

That topic is covered here: wp_enqueue_script() Code Reference on WordPress.org

Part V.: Template programming – AJAX

  1. First create a two-level hierarchical category structure on your website.
  2. Then create a drop down where you select a category (you can surely find the right WP function to do that). Selecting a category there should load another drop down next to it, where you will be able to choose any of its subcategories.
  3. Use wp_ajax_ hooks for the AJAX handling.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You can click here to Subscribe without commenting

Primary Sidebar

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2025 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in .

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!