If you’re like me, you would think that a feature like this would be made very obvious in the WordPress admin interface. In my experience, in the majority of cases, there’s no reason to give your visitors the ability to comment on a normal Page on your site. Posts, sure, but Pages?
Especially when developing a site with a child theme, you may not want to go into the page.php file and just remove or comment out the code related to inserting the comments. But other than that, how do you prevent the display of the ‘Leave a Reply’ comment section on pages. There’s no setting present when you’re on the regular ‘Edit’ screen for a page.
However… there is a simple solution; Quick Edit! If you use the ‘Quick Edit’ mode for pages often you’re likely well aware of this feature. If you go to ‘Quick Edit’ mode for a page you see a handy little checkbox with a label that says “Allow Comments”. There’s your solution. The box is checked by default. All you need to do is uncheck it.
Most of my WordPress sites have a small number of pages but a large number of posts. So, turning off comments only on pages is not a big deal given this little tip.
I’m surprised this feature isn’t more publicized because it’s so simple.
TheDashbaord page of yourWordPress admin interface offers a quick and useful high-level view of your site’s content with the ability to quickly take action as well. There are a number of modules on the dashboard, one of which is the QuickDraft module. Not only does the QuickDraft module allow you to quickly begin a draft of a new post but it also presents you with a list of drafts. For some reason it has been decided that this module should only display drafts of Posts. It would seem to make perfect sense that draft Pages would also be included, but they’re not. However, there is a quick fix for this!
For some reason it has been decided that this module should only display drafts of Posts. It would seem to make perfect sense that draft Pages would also be included, but they’re not. Have no fear, there is a quick fix for this!
To make draft Pages show up in your QuickDraft module on your WordPress Dashboard simply edit the dashboard.php file in your WordPress install. This file can be found here:
> wp-admin > includes > dashboard.php
The line in question is in the function wp_dashboard_recent_drafts. Search for this function and edit the following:
'post_type' => 'post',
and change it to
'post_type' => 'any',
That’s it! Now you’ll have your draft pages listed right there on your dashboard for easy access.
You may not have realized that since Google Analytics made the switch to its Universal Analytics code you event tracking code has to change. The common error resulting from using classic analytics event tracking syntax with the new Universal Analytics code is:
Uncaught ReferenceError: _gaq is not defined
This is because the new code uses ‘ga’ instead of ‘_gaq’.
Also, the syntax of the call has changed. If you don’t update the syntax you may end up with this error:Uncaught syntax error”: Unexpected identifier
Uncaught syntax error”: Unexpected identifier
Here’s an example of what you use with classic analytics:
onClick=”_gaq.push([‘_trackEvent’, ‘Phone’, ‘Click’, ‘Click to Phone’]);”
What you should be using now looks more like this:
onClick=”ga(‘send’, ‘event’, ‘Phone’, ‘Click’, ‘Click to Phone’);”
Yesterday Google released a new Chrome extension that allows you to initiate a voice search from the Google search page by simply saying “OK Google”, much like you do in Google Now for Android or iPhone. This is a very handy feature that works quite well.
Unfortunately for those outside of the US, this feature won’t work by default. There is an easy workaround though.
By default, if you try to go to google.com outside if the US you will be redirected to your country specific page. E.g. In Canada you will be redirected automatically to google.ca
Since you’re not on google.com, the Google Voice Hotword Extension won’t work.
That’s it. The ‘ncr’ at the end of the URL stands for No Country Redirect. Using this will force your browser to use google.com instead of your country specific search page.
One thing to be aware of is that going to the /ncr version of the Google search page will result in a cookie being set on your browser. This cookie will make your browser use the /ncr version all the time. If you still want to use your country specific search page sometimes and don’t want to have to delete the cookie each time, simply do your search by using an incognito window to perform your voice search (⌘-Shift-N on Mac). The cookie will only be set for that window so you’re good to go anytime you want to go back to using your country specific search page.
If you commonly ssh from your OS X computer to a remote server such as a web server it makes sense to set up passwordless ssh login so you can have a secure connection without having to always enter your password. Setting up passwordless login also allows you to run automated scripts to help with managing things like offsite backups. Scripts can’t be automated if they require someone to be present at your machine typing in passwords every time they run.
It’s worth noting that you may first want to check if you already have existing ssh keys on your computer. This can be done by entering cd ~/.ssh [enter] at your terminal. If you get a response back stating “No such file or directory” then you need to proceed with the following steps.
To set up passwordless login between a remote unix/linux server and your OS X machine fire up terminal and…
1. generate an RSA private key
ssh-keygen -t rsa -C “firstname.lastname@example.org”
2. copy the key to your clipboard
pbcopy < ~/.ssh/id_rsa.pub
3. ssh into the webserver
ssh email@example.com (login with your password for the last time)
4. make a .ssh directory, if it doesn’t already exist
5. create an authorized_keys file and paste in the key from mac that you just copied to your clipboard
vi .ssh/authorized_keys (paste in key from clipboard, save)
6. set permissions for necessary files and directories on webserver
I periodically come across the “Bad Request Error 400” problem when using Gmail on Google Chrome. I’m not the only one as you can see from a Google search on the topic. One minute all is well and the next, reload after reload all you see is a blank page and this error message. You haven’t changed anything but things just don’t work anymore. If you try accessing Gmail on a different browser like Firefox, everything seems good, so it’s not Gmail itself; it’s the combination of Gmail and Chrome.
It seems quite ridiculous really that this issue should happen on Chrome. Shouldn’t Gmail on Chrome be essentially bulletproof? Google on Google. C’mon.
When looking for answers the most common suggestion you’ll find is to clear all of your browsing data; history, cache, cookies, etc. I happen to like my browsing data. Among other things, it helps me find things and allows me to stay logged in on various sites. Deleting it all causes me pain.
After searching through various sites and the Gmail and Chrome forums I finally found a great solution. It turns out deleting all of your browsing data is not necessary. This problem comes down to one solitary cookie. Delete this cookie and life is good again.
How to resolve the Bad Request Error 400 in Gmail
Here are the exact instructions.
– Right click on the page with the error
– Select “Inspect Element” from the right click menu
– Select the “Resources” tab at the top of the Developer Tools pane or window that opens up
– Expand the “Cookies” section on the left side navigation by clicking on the little triangle next to “Cookies”
– Select the “mail.google.com” cookie
– Right click on “GMAIL_IMP”
– Select “Delete”
– Refresh the error page
From what I’ve found when searching online, I’m not the only one who has their cursor periodically disappear in OSX Lion. Once in a while I’ll return to my Mac Mini (my iMac and Macbook Pro never have this problem) and my cursor is nowhere to be found. The mouse or trackpad still works; if you go way down on the screen over the dock the hover affect will work but the cursor is still not visible.
Zoom the Screen
One way I found to bring the cursor back is to zoom the screen. If you don’t already know this, you can zoom in the screen at any time by holding down the ctrl key and scrolling up (or down depending on your system preferences). You can then zoom back to normal again by doing the opposite and, voila! Your cursor is back.
I can’t guarantee that this will work for you but it definitely works for me and I’ve heard from many others who say the same. Hopefully this tip will help you end the frustration of the missing Lion cursor.
If you have another solution to this issue, please do let me know in the comments. I’m sure others would love to hear about it too. The above solution works but it still annoying.
Have you been frustrated with trying to download your PayPal transaction history only to have the browser spin it’s wheels forever. Even if your report is small, the download still usually fails. I’ve fought with this many times and have finally found the fix. Apparently this is due to a PayPal timeout issue. You can fix this problem by using a terminal command to “aggressively try and keep the connection to PayPal alive” so the download can finish.
Have you ever had one of your websites become inaccessible on only one of your computers? The site loads up fine on every other machine you try it on but on this one machine, nada. If you try to ping the domain you’ll likely be presented with an ‘unknown host’ error.
If your computer is a Mac you will likely first think to try dscacheutil -flushcache . However, this will not work for you unless you are using an older version of OS X. Now what you’ll have to do is the following:
sudo killall -HUP mDNSResponder
In most cases this is what will work for you. I won’t bore you with a lengthy explanation of why. Just try it.
Being a nerd I love keyboard shortcuts. Because of this, when using a Mac I use Spotlight extensively. I use Spotlight as a calculator, for word definitions, and most frequently, to launch applications and find files.
One of the many changes in OS X Lion is a change in Spotlight is that it no longer displays the path to a file on your machine when you mouseover a search result. Previously I used this all the time when trying to locate files. How could Apple get ride of this extremely useful feature?
Well, they didn’t. It’s still available but is a bit more hidden. I’m not sure where this is documented or how we were supposed to figure it out but thanks to Richard Cardona and the CapMac Forums I learned how to get file paths again. Now I’ll share it with you.
As before, enter your search query in Spotlight.
Also as before, either use your arrow keys to move down to the appropriate search result or mouseover the search result
When the new preview window pops up to the left of the Spotlight results, hold down the command key
At the bottom of the preview window the name of the file will initially be displayed. Keep holding down the command key and in a second or two the path of the file will be revealed! Now you know where that file is located on your system.