Skip to content


Repository files navigation

OKFN WordPress Theme

OKFNWP is a WordPress theme built on Bootstrap.

Getting Started

You'll need the following installed before continuing:

  • Node.js: Use the installer provided on the NodeJS website.
  • Grunt: Run [sudo] npm install -g grunt-cli

To get started run:

npm install && grunt watch



The homepage template is a regular full-width content page. Use the [latestposts] shortcode to display the latest blog posts.


Latest Blog Posts

To add a 3-column row of the latest blog posts, use:


To change the section heading from the default 'Latest posts from the blog', pass in a title="" parameter:

[latestposts title="Recent Posts"]

Coding Standards

Uses PHP CodeSniffer as the basis, along with WordPress Coding Standards. PHPCSUtils and PHPCSExtra are also required.


Make sure you are running PHP CodeSniffer 3.7 or above. Clone it from GitHub and add its binaries to the relevant system folders, so you can use phpcs or phpcbf, without the need to specify the exact path to the binary.

  1. Clone to your home folder.
  2. Set symlinks to the binaries of phpcs and phpcbf container in ~/PHP_CodeSniffer/bin/ with the following commands in any Linux distribution.
sudo ln -s ~/PHP_CodeSniffer/bin/phpcs /usr/bin
sudo ln -s ~/PHP_CodeSniffer/bin/phpcbf /usr/bin

Once symlinks are created, try to execute phpcs in the terminal. You should get the following output and it means that you're all set to use PHP CodeSniffer.

ERROR: You must supply at least one file or directory to process.

Run "phpcs --help" for usage information
  1. Next, clone to your home folder in a subfolder called wpcs for your convenience.

  2. Clone to your home folder

  3. Clone to your home folder

  4. The only thing left to do is to make sure phpcs uses these extra sniffs and knows where to find them. We do that by updating it configuration.

phpcs --config-set installed_paths ~/wpcs,~/PHPCSUtils/PHPCSUtils,~/PHPCSExtra

If the configuration is properly updated, you should get the following output when executing phpcs -i.

The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs, WordPress-Extra, PHPCSUtils, NormalizedArrays and Universal

If something is not right and you can't get it to work, use phpcs --config-show to see what you have PHP CodeSniffer configured with.


Just run ./ and follow the output. Test will find all kinds of errors and the simple ones will be corrected automatically. For the other ones you'll need to rerun the tests to confirm they have been resolved.