You way be wondering why I wrote this blog post? This is pretty well known and there are hundreds of results in Google if you forget. Well, the problem is most of the current Google results require you to scroll down very far to get to the main point. So with this post, I can just google for “chinhdo symbolic link” and I find what I need immediately right at the top of the page.
If you get this error in Visual Studio Code when trying to commit without first setting git username/email, then run the above commands to fix: “Make sure you configure your ‘user.name’ and ‘user.email’ in git.”
You way be wondering why I wrote this blog post? The reason is that most of the current Google results require you to scroll down very far to get to the main point. So with this post, I can just google for “chinhdo git username” and I find what I need immediately right at the top of the page.
I spent a good part of the weekend on a re-design of a client’s dental practice site. Like probably 95% of dentist/doctor practices’ sites out there, this site runs on WordPress. Here’s the updated design:
Here’s the mobile version:
I didn’t have time to find/get better photos for the mobile dentistry service at the bottom of the page, so those photos will have to do for now.
So, here are some tips for how to quickly make changes to an existing WordPress site:
Learn the Theme
Familiarize yourself with the WordPress theme in use. Every theme works a little differently. The theme for this site exposes a lot of the options via its Theme Options menu, but not all theme customizations can be done there. Some of the options must be done in WordPress’s built-in Appearance/Customize menu.
Most commercial themes also come with fairly extensive documentation. Give the docs a read-over at least once.
Learn the Plug-ins
Many sites / themes make heavy use of plug-ins. For example, this dentist office’s site uses Slider Evolution to show a slider on the home page. Slider Evolution itself is fairly deep application with lots of options.
Use the String Locator Plug-in
The String Location plug-in is great for when you see some element on a page that you need to change, but have no idea how it gets there. This plug-in lets you easily search through your themes, plugins, or even WordPress core to find files containing the text.
Track Your WordPress Site in Git
Adding the site’s files to a git repo allow you to track changes you make to the theme’s files (style.css, header.php, etc.) and easily revert or identify exactly what you changed.
You should configure your .gitignore to ignore at least the following folders/files:
Make Frequent Site & MySql Backups
Set up automated backups of the site’s files and database, so that in the case a disaster happens, you have something to go back to.
Here’s the script I use to back up my files and database:
Override CSS with Appearance/Customize/Additional CSS
With WordPress themes, the “Additional CSS” feature can be used to customize CSS to your liking. I find that the best way to use this is in conjunction with Chrome Dev Tools. I would try to get a relevant class for the element I need to tweak, and customize its CSS. A lot of times you need to add “!important” for your override to take effect. A really cool thing about the Additional CSS feature is that any CSS change takes effect right away in the preview pane.
I used to shop at Circuit City a lot and I kind of miss it now that it’s gone. I live in Richmond’s West End where there used to be two big Circuit City stores within a few miles of each others. Today I got an email from CircuitCity.com and it looks like the web site now has a new owner.
A few months ago when they were having the liquidation sale at one of their headquarter buildings, I came in, bought a few things, and took a few pictures. Having gone through a dotcom bust earlier in my career, the site actually looked eerily familiar.
Now people have blogs. So I guess I’ll have one too.
Actually I have been thinking about starting a blog for a while now but I just didn’t sit down and do it yet because I was afraid that it would take a considerable amount of work to set one up. Also since I do .Net development for a living, I thought I would code the blog myself from scratch (boy am I glad I didn’t choose the custom development route).
Two hours ago, I started out with Blogger. After creating a test account and playing with it, then trying to see if I can host the blog on my own domain (you can’t with the beta version of Blogger), I finally found this article which lead me to WordPress. Thirty minutes later… I have this. It wasn’t too bad setting up a WordPress blog on my own domain.
I will probably write mostly about programming (.NET, C#, architecture), gadgets, and technology topics. For my friends and family, they will be subjected to the same boring stuff as before: family pictures.