How to change from “file_get_contents” to “wp_remote_get”

First, there is no error checking on any of the code, both the file_get_contents code, and the wp_remote_get code. Don’t just assume it worked, check! $response = file_get_contents( “http://www.geoplugin.net/json.gp?ip=” . $ip_address); if ( false === $response ) { // it failed, abort! Three steps, first, make the request: $response = wp_remote_get( $url ); Note that … Read more

Mixed content error after adding SSL certificate

You have version 1.6.0 of the crossslide plugin. (I’d guessed 1.5.2 since the changelog said 1.6.0 fixed this, but it didn’t.) You can fix this by unticking the ‘Default jQuery’ option in the plugin configuration, which removes the ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js include replacing $( with jQuery( on lines 101 and 102, i.e. instead of $(function(){ $(‘#crslideshow’).crossSlide({ you … Read more

Virtual Ticket selling

I use a paid plugin called License Manager for WooCommerce (found in Themeforest), but also looks like there is a free version. It can send out random codes, preset imported codes, image based codes that you import, or codes with a prefix or suffix. It does, however, require WooCommerce. If you had say 20 access … Read more

How to change “Read More” text?

add_filter(‘gettext’, ‘translate_my_text’ ); function translate_my_text($translated) { $translated = str_ireplace(‘Leave a comment on: “%s”’, ‘my text“%s”’, $translated); $translated = str_ireplace(‘Leave a Comment’, ‘my text’, $translated); $translated = str_ireplace(‘Read More’, ‘my text’, $translated); $translated = str_ireplace(‘READ MORE’, ‘my text’, $translated); return $translated; }