Monthly Archives: October 2013

How to Suppress WordPress Update E-mails

Did you recently get an email that said something like: Howdy! Your site at http://example.com has been updated automatically to WordPress 3.7.1. The file that is responsible is: wp-admin/includes/class-wp-upgrader.php And the function is send_email which is part of the class WP_Automatic_Updater To disable the email messages you can add this code: add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); For a lot of great options related to managing automatic updates in WordPress 3.7+ see this question.

Posted in Tech Tips | Tagged | Leave a comment

What do you do after Linking your AdWords and Analytics accounts?

Great! You’ve linked your AdWords and Analytics accounts. What’s next It may take up to 24 hours for your AdWords link to begin displaying data. Here’s what else you can do: See Analytics engagement metrics in AdWords Enable new columns in AdWords to display important Analytics metrics–like Bounce Rate and Avg. Visit Duration –right alongside your standard AdWords performance data. This post-click insight gives you another view of the effectiveness of your campaigns and ad groups, which can help you make decisions about budgets, bids, landing pages, and ad copy. Learn more Create a Remarketing list in Analytics Remarketing with Google Analytics lets you follow up with people who have already visited your website, and deliver ad content specifically targeted to the interests they expressed during those previous visits. Take advantage of Analytics data to identify those interests (e.g., which product pages they visited) and build lists focused on those users. Learn more Import Goals and Ecommerce transactions into AdWords You can can easily import your Analytics goals and Ecommerce transactions into AdWords, allowing you to make more informed refinements to your campaigns without ever leaving your AdWords account. If you’re using AdWords Conversion Optimizer to manage your bids, it will automatically start using Analytics goals and Ecommerce transactions once you’ve imported them into AdWords. Learn more

Posted in Marketing, Tech Tips | Leave a comment

homebrew tidy html5

Here’s how you install tidy (html-tidy) with homebrew and get the latest HTML5 version: Tap Dupes First make sure you tap the dupes repository: brew tap homebrew/dupes Next you just need to use: brew install homebrew/dupes/tidy –HEAD Then you are good to go! If you have any problems you may want to try a few of these things: Remove old / other versions: brew remove tidy brew cleanup tidy Then re-run the install command Check your path If you run “tidy” and get an old version, try typing `which tidy` If you see this you’re seeing the version that comes with Mac OS X: /usr/bin/tidy You should instead be seeing something like: /usr/local/bin/tidy You can check you version by doing: tidy -v This is wrong: HTML Tidy for Mac OS X released on 31 October 2006 – Apple Inc. build 15.10 This is correct: HTML Tidy for HTML5 (experimental) for Mac OS X https://github.com/w3c/tidy-html5/tree/c63cc39 If when you are running just tidy you are getting the older version you need to check that your path variable is set correctly to use the homebrew bin directory before using the system bin directory. See this question Your path should be in some sort of orders similar to this: /usr/local/bin /usr/bin /bin /usr/sbin /sbin You can also try and run /usr/local/bin/tidy -v to see if the newer version has been installed successfully. Update Homebrew You may also need to run brew update ( or even brew upgrade ) to get the latest versions of … Continue reading

Posted in Uncategorized | Leave a comment

fake procmail script

This is similar to fake sendmail. Need a procmail script to deliver messages locally on your machine? Need to do postfix development local for mail ? This will override the “to” field on postfix (more or less) by saving all mail to a local file. Here is a PHP script you can use: Tweak it to fit your needs, adjust #!/usr/bin/php to point to the php file that you use on your system if necessary ( try which php ) The script may need to be in a folder that it has write access to, or that postfix / procmail has write access to. After saving the script to something like /usr/local/fake-procmail.sh edit /etc/postfix/main.cf and add or edit this line: mailbox_command = /usr/local/fake-procmail.sh Also make sure you make the script executable: chmod +x /usr/local/fake-procmail.sh You will also need to route all mail to the localhost by adding these lines: luser_relay = [email protected] local_recipient_maps = mydestination = pcre:/etc/postfix/mydestinations Change johndoe to your user name. Also create a file /etc/postfix/mydestinations and add this to it: /.*/ ACCEPT More info about that here. Then restart postfix if needed: sudo /usr/sbin/postfix stop sudo /usr/sbin/postfix start And try sending a message, or piping some text to the script: echo hello there | mail -s “test message” [email protected] Or echo hello there | /usr/local/fake-procmail.sh There should now be messages in /tmp/procmail-messages/ – change the script to change the location where they are saved. It’s easier than setting up and chrooting postfix on Mac OS X Lion … Continue reading

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

wordpress get posts by id

Simple solution for the wordpress get_posts function to get a list of posts by post id / an array of post ids: $args = array( ‘post__in’ => array(34,36) ); $posts = get_posts($args); It’s always really hard for me to remember that crazy post__in with a double underscore between post and in.

Posted in Tech Tips | Tagged | Leave a comment