I’m taking a deep dive into WordPress’ Conditional Tags feature this month to get a better understanding of how it can minimize custom written code while providing practical features.
This personal study project will do the following.
- Create a fictional small business
- Anticipate its needs in a website
- Use Twenty Seventeen as the Parent Theme
- Add some practical custom features
- Most importantly, create a minimal amount of new code.
A small restaurant trying to up it’s social media and web presence. This business would have relied solely on social media and a basic informational website in the past.
Their Needs for an Improved Website
The owner wants to generate more interest in the community. They have time to write and photograph a few times a week and drop in on social media. Meanwhile, staff have been concerned that answering phone calls, and social media posts from people asking for basic information cuts into their time with customers. With a little planning everyone thinks that their website could help with some new features.
- A Currently on Tap and Dining Menu that can be easily maintained.
- A listing of entertainment and specials.
- A simple blog that supports the business within the community.
Twenty Seventeen as a Theme
Twenty Seventeen is almost perfect but the owner still needs a few practical features to humanize the business and inform the community.
- Author profiles for the blogging staff
- Practical suggestions like food parings
- Maintain an archive of current and past offerings; items move in and out of availability almost daily so the manager will be tasked with updating the website as needed.
With a single well planned bit of code the Author profiles can be added to each post, page and author’s archive along with their portrait.
A second bit of code will also be added to posts about beer suggesting the reader view what’s Currently on Tap. It will also check if the beer they’re reading about is currently available.
A third block of code will create beer parings for current menu items; If possible the owner would also like parings for currently unavailable items
- Each menu item, beer and event will be a post
- Categories can then be used to control availability and placement of items
- Tags will be used to create pairings
- All content updates must be possible through the dashboard by an Editor
- No plugins
I set up Drupal 8 earlier this week to kick the tires and get a better understanding of how it differs from WordPress. For starters it provides granular user controls. I imagine this could be a killer feature for anyone setting up an elaborate subscription site where various levels of users are granted additional access.
As a WordPress user I’m a little jealous of how easy it is to create, edit and modify user roles. I could see myself wanting to allow certain users the ability to edit their own menus in WordPress. Drupal allows that function without additional modules.
Hmm. I’m going to have to keep digging and see what other surprises I find.
A terminal based Pomodoro coountdown doesn’t appear to exist but can be created simply in i3’s config file.
It requires the following packages to enable “notify-send” which is a simple gtk popup notification.
# Pomodoro start and end notifications
bindsym $mod+Control+p exec notify-send --icon=gtk-info Pomodoro "Focus for 25 minutes" && sleep 2500 && notify-send --icon=gtk-info Pomodoro "Take a 5 minute break"
This quick notification will dismiss itself in a few seconds, if you blink you may miss it.
As an alternative I’m also considering adding my bash command to lock the system and force that me to at least put in my password to continue.