WordPress: Using add_query_var to create custom post type URL variables

This post follows on from https://creativedigital.co.nz/wordpress-adding-pagination-to-custom-post-types/ After enabling pagination on our custom post type, we also wished to utilise a URL variable to differentiate between ‘widgets’. This was achieved using the WordPress function ‘add_query_var’ in our functions.php: With this new variable, we can now query a subset of widgets based on the URL variable supplied eg. … Continued

WordPress: Adding custom breadcrumbs

This may not be the most elegant solution, but has nicely fitted the WordPress website I am currently developing. The brief required that we have a general “Tours” landing page that links to two subcategories (custom post types) – “Mike’s Tours” and “Sally’s Tours”. Using custom post types has allowed us to customise each of … Continued

WordPress: Adding pagination to custom post types

Original source: http://callmenick.com/post/custom-wordpress-loop-with-pagination The following code is excellent for creating pagination for your custom post types. Place the following in your functions.php: The following is placed on your custom template page.

Swift 3: Creating a custom edit button for UITableViewController

My brief was pretty simple for this Swift module: click on a row to view a member’s detail page. Click on the edit button beside a member to update data. Accessing the detail page turned out to be very straight forward using self.tableView.indexPathForSelectedRow!.row to select the relevant member from our entity. My difficulty arose when trying … Continued

Swift 3: Programming a simple stopwatch

For the last while, I have been extending my programming skill set by learning Swift. Swift is a programming language for MacOS, iOS, watchOS and tvOS applications. As both a resource for myself and hopefully a resource for fellow programmers, I thought I might start publishing some of my early scratchings. I emphasise early! Don’t … Continued