Let’s just say my pants have been struggling to keep up with my width. I need to start looking at my diet.
So, I thought this would be a great time to utilize custom post types from within a WordPress theme. The goal would be to create a theme that tracks:
- Foods that I eat + calories contained in each food item (i.e. apple = 110 calories)
- Categories of food that I eat (i.e. sweets, breads, grains, dairy, etc.)
- Daily caloric intake (i.e. “1095 calories eaten today”)
- Qualitative feedback about whether or not I met my caloric goals (i.e. I burned 27 more calories than I took in today! That is good.)
I could create a custom post type called “Daily Calorie Tracker”. Each day, I would create a “Daily Calorie Tracker” post that would have:
- custom fields for “type of food” (i.e. apple) with a value of the calories in that type of food (i.e. “110”)
- custom fields for the category that each food item is in (i.e. fruit)
- daily caloric intake goal (i.e. 2000 calories)
Using PHP, I would then display the results of my day’s caloric intake on the front end of the website as well as suggestions for improvement.
Using Heavy Analytics, I would then track how I am doing against my goals. Am I doing good? Do I need improvement? etc.
That’s my idea for the night. What do you think? Any suggestions on how I can streamline this? Did I miss anything?
More posts from themightymo.com
Today I checked the “proxy” box for a website on Cloudflare, and I got a “ERR_TOO_MANY_REDIRECTS” error when I visited the website. The solution to this issue is simple: Click the “SSL”->”Overview” menu option in Cloudflare. Select the “Full (Strict)” option. Wallah! Done. Is this helpful? UPDATE: I learned that there is also a free…
How to solve Local WP’s “Error in query (1153): Got a packet bigger than ‘max_allowed_packet’ bytes”
I was trying to import a 115MB database via Local WP’s Adminer tool, and I kept getting the following error: After a lot of trial and error, the solution was to: Update the “max_allowed_packet” variable in Local Sites->[site name]->conf->mysql->my.cnf.hbs to max_allowed_packet = 1000M Add/update the “max_allowed_packet” variable in Local Sites->[site name]->conf->php->php.ini.hbs to max_allowed_packet = 1000M…
I was tracking down some strange inode action on a shared hosting provider today and discovered that Divi WordPress theme created 70,000+ unnecessary inodes. As you can see in the inode count in the above screengrab, Divi theme created over 70,000 inodes in a temp folder above the web root. For comparison, this WordPress install,…