Settings

Trying to create a routine

With the upcoming work situation changing for the unforeseeable future, I thought it would be a good time to get back into some routines. So starting with tomorrow I think I will do the following:

  • start the day with 20-30 minutes riding the bike
  • do my fitness routine every second day, at least 3 times a week
  • try to write a daily blog entry, get the ball going again.
  • define days on which I work on a project and mark them in a calendar

Hopefully, with a structured day, I will be productive over the next few weeks and then some cool things will come out of it. So let’s find out.

Factory Feed

Portfolio Preview Image Bad Milk Preview Image SoaPatrickSix Theme Preview Image Reflection Short Film Preview Image

The rest can be seen in the Factory.

A Small Update

It’s a crazy time and I didn’t expect it to get this bad, but that’s the situation now, so let’s make the best of it.

On my end, I was busy the first half of the month by finishing the corporate website for my employer. It was an interesting project, creating such a big website with WordPress was a big learning experience. A lot of things I learned and discovered flew into SoaPatrickSeven.

One of the things that I adapted here is the theme and template structure, a more lean and logical structure of all the files in the theme. This structure makes it easier for other people to find things if they have to make changes to a theme. I know this isn’t relevant with SoaPatrick but it’s helpful anyway.

Then I also got rid of all the Gutenberg styling and used my own, that way I could leave out all the styling for blocks I didn’t use, which is a lot.

There are still some things in the backlog, actually the same tasks as in my last post and hopefully, I get to that sooner than later, the same with my next movie project.

Got some new pipeline minutes

A new month and it all starts back at zero. So I used my Sunday with working on version 2.3.0. The biggest new addition to the theme or the page, in general, is a Data Protection page where I go into some detail about what is happening with your data on this website. The short answer? I don’t collect your data, but I thought I could explain and be transparent about it. The page can always be accessed through the nice little icon in the footer.

I also improved the list view of related blog posts in the factory detail view. and added colorized code styling back again. Makes reading the code much easier.

As for the next release, I will probably rethink the grid with better grid column widths. After that, I can define new image sizes and reduce the number of breakpoints. But from a technical standpoint, those are the remaining big ones.

From a content standpoint, I plan on writing excerpts for all the factory items, because this makes sense from a sharing and SEO perspective. But I do also have an idea for a new short, but that’s something for another blog post.

Some additional features

In the last few days, I did add some additional features on Seven before I used up all my Bitbucket Deployment minutes. I’ve released version 2.1.0 and 2.2.0 and a few things that changed I’d like to mention here.

Related Blog Posts

I’ve played around with this idea for some time and because I worked more extensively on WordPress at work, I noticed how easy this is to realize. So gone is the single blog post navigation where you switch between the previous and next entry and all that is left are four related blog posts based on similar tags. Now using the right amount and the correct tags are even more important. So here is how it’s done.

First, we need the terms (tags) of the current post.

$terms = wp_get_object_terms( 
  $post->ID, 
  'post_tag', 
  array(
    'fields'      => 'ids'
  ) 
);

Then we find four OTHER posts with similar terms

$args = array(
  'post_type'           => 'post',
  'post_status'         => 'publish',
  'posts_per_page'      => 4,
  'orderby'             => 'rand',
  'tax_query'           => array(
    array(
      'taxonomy'          => 'post_tag',
      'field'             => 'id',
      'terms'             => $terms
    )
  ),
  'post__not_in' => array ($post->ID),
);

and then we make a new query with those arguments and loop through the results.

$related_items = new WP_Query( $args );
if ($related_items->have_posts()) :
  while ( $related_items->have_posts() ) : $related_items->the_post();
    // do stuff here
  endwhile;
endif;
wp_reset_query();

Related Factory Items

Same as with blog posts, I thought instead of showing just navigation between factory items, a section with related items makes more sense. So I just used what I did for the blog posts and changed the query to go through terms from the custom post type factory and that was it. Using the featured image here makes more sense than with blog posts.

Related Blog Posts (II)

No these are different but maybe I should rename it. On the detail view of a factory item, there is now also a list of blog posts where this factory item was mentioned.

I thought about doing this for soooooo long that I had different approaches on how to achieve that. What I now did, was creating a new taxonomy for posts called Projects. I create new projects and chose those projects within blog posts. Now on a factory item, I can choose one of those created projects and then all posts tagged with that project will be displayed.

I know I could achieve that by linking factory items directly to blog posts, but I start on writing about new projects long before I created said factory item. I could create draft items and publish them later on. I might still switch to this solution later on, who knows.

It’s Alive

14 days after deciding to start a new theme and almost 10 months since the last release I’m done with an initial releasable version. I know on the front it doesn’t look like anything changed, but below the hood, I did a lot of improvements. The new Stylesheet is now 4kb smaller, but not only is it slightly smaller, everything is built much more modular and a lot more using css grid.

What I did change though were the Navigation Icons. I used Fontawesome’s new Duotones icons and I also included them, the calendar and the tag icons, directly as SVG, so they won’t be loaded through FontAwesome but are loaded as regular markup instantly and therefor no layout shift is visible.

Another noteworthy addition is now the ability to use this website with your keyboard only. I highlighted the focused element and you can even switch between light and dark mode and between color themes all with your keyboard. There are a few issues with special elements, but I think it’s better than nothing.

This is now version 2.0.0 and there are tasks for further improvements. I will probably delete every image size version WordPress generated from my uploads and generate new ones with fewer different and improved sizes.

There are also ideas for an infinite changelog scroll, related factory items and related posts on a factory single view.

But for now, I relax a bit and enjoy my weekend.

Instagram Feed

If you have the time and feel like it, why don’t you follow me on Instagram?