My Valet Site Stopped Working

Chrome requires .dev sites to use https, so to simulate that valet has a great built-in command called ‘secure’.  Just run the secure command on your linked domain to make it emulate loading with https.

 

To secure domain.dev, run the command:

$ valet secure domain

Upgrade Valet

If you already have an older version of valet:

$ valet stop

$ valet uninstall

To install the new version:
$ valet install
Restart MySQL:
$ sudo mysql.server start

How to Update Version of php on local machine using Brew

  1. First, update Homebrew:

$ brew update

2. unlink the current version of phpp being used by your local machine

$ brew unlink php7X

3. Download your chosen version of php using Homebrew

$ brew install php7X

That was it! Confirm you have successfully installed and linked the new version of php by running

$ php -v

Wordcamp US 2017

This year Wordcamp US was held in Nashville, TN.  I had never been to Nashville before this Wordcamp, and let me just say that it is awesome.  I have been to a few Wordcamp USs but this was by far my favorite one.

I had the Nashville hot chicken, went to a bar/restaurant on the mini-strip (Broadway St.) and saw some awesome things at museums in Nashville.  Most important about my trip to WCUS was the WordPress.  I love talking about it, and I had the privilege of seeing some great speeches and coding with my friends from the WordPress community.

My return flight was too early, I would have wanted to stay for longer on the last day because I had to run out on my friend Paul Barthmaier in the middle of writing some code.

WordPress 4.9 “Tipton”

What’s new in 4.9?

  • Major Customizer Improvements, Code Error Checking, and More! 🎉
  • Draft and Schedule Site Design Customizations
  • Collaborate with Design Preview Links – send a client a link to showing the new customizations before you go live with them!
  • Design Locking Guards Your Changes – Customizer changes cannot be overwritten by another designer
  • Syntax Highlighting and Error Checking
  • New Gallery Widget
  • Preview new themes from the customizer

Add this text to a plugin file or your theme’s functions file and then change the ’18’ to the id of the category of products you want to apply the filter to.

$my_product_array = array( 799,796,792 );//add in product IDs
if ( in_array( $product_id, $my_product_array )) {
$textafter = '( Upfront Paid in Full Price )'; //add your text
return $price . '
' . $textafter . '';
}else {
return $price;
}
}
add_filter( 'woocommerce_get_price_html', 'themeprefix_custom_price_message' );

Add this text to a plugin file or your theme’s functions file and then change the ’18’ to the id of the category of products you want to apply the filter to.

/**
* Filter woocommerce product titles.
*
* @package Fix
*//**
* Filter the product title by category
*
* @param string $title The title.
* @param integer $id The id.
*
* @return string Filtered title.
*/
function woocommerce_category_title_filter( $title, $id ) {$post_type = get_post_type();if ( 'product' !== $post_type ) {return $title;}$categories = wp_get_post_terms( $id, 'product_cat' );if ( empty( $categories ) ) {return $title;}$cat_ids = wp_list_pluck( $categories, 'term_id' );

if ( ! in_array( 18, $cat_ids, true ) ) { // 18 is the product category id being filtered

return $title;

}

return ‘Per Day ‘ . $title;

}
add_filter( ‘the_title’, ‘woocommerce_category_title_filter’, 10, 2 );

Wordcamp Baltimore 2017

I went to Wordcamp Baltimore before and it was one of my favorite Wordcamps and this time it still was!  These Wordcamps are fun because the talks are more development-based which I find interesting and the city is very nice.  The bottom line is that I like the Baltimore Wordcamps and I know from experience.

Millenium Technology

This is a website that I designed and developed in WordPress using photoshop and Illustrator to create the mockups and then PHP to create the interface.  This was an especially fun project because it required me to make a custom plugin in order for me to create that easy update interface that is the trademark of all my sites.

I strive to make all of my sites easy-to-update for all of my clients using plugins, custom post types, custom fields and shortcodes.