I AM LISTENING TO
|
WHAT I LIKE
  • English
  • German


BLOG FILTER



The current Google Analytics Dashboard for WordPress integrates no Opt-Out to disable tracking, which is required in Europe. Here is a workaround for that.

Paste this into your theme function.php.

Then add this to your data privacy document:

 

readmore

When the defer attribute is present in the script tag, it specifies that the script is executed when the page has finished parsing. A requirement that is enforced by Google for example (Page-Speed ranking).

Currently the WordPress wp_enqueue_script provides no easy way to add new attributes, but there is a way around that :)
The below hack / filter needs to be added to your theme function.php. The filter should be your preferred solution, as the clean_url filter has been deprecated.

Make sure that your website / theme is still loading after adding these changes. If needed you can add more exceptions, as I did for jQuery.

Hack for WordPress before 4.1

 Filter for WordPress 4.1+ 
Updated: 26.04.2015 – using clean Regexp

 Browser Support

  1. All modern browsers
  2. Support in IE9 is flaky, as the execution order isn’t guaranteed.
  3. Can I use

readmore

Compressing your content saves bandwidth and improves render time, particular on devices with slow internet connections. Compression allows your web server to provide smaller file sizes that load faster for your visitors. Compression of your HTML and CSS files with gzip typically saves around 50 to 70 % of the file size.

Check if GZIP Compression is active on your website

  1. HTTP Compression test
  2. Check GZIP Compression

Adding GZIP Compression via your htaccess (Apache)

Adding GZIP Compression on NGINX

Adding GZIP Compression via a WordPress Plugin

A good candidate is the WP Far Future Expiration Plugin ,which not only activates GZIP compression but adds file expiration for various static file types.
Link

Check speed improvement before and after

  1. GTmetrix
  2. Google Pagespeed
  3. Pingdom Tools
  4. YSlow

readmore

Will be adding some basic information about using the current Google API with the PHP SDK, this includes Google+, Youtube and other services. For setting up the actual API access see the Google documentation and Google Developer Console 

Including the SDK (Github)

 Prepare Client

 Set Scope (Available Scopes)

Setup Google Plus Client

Login

Get Google Plus Activity

 

readmore

Will be adding some basic information about using the current Facebook API with the PHP SDK.  Have been updating a lot of old API integrations over the past 2 months and finally solved many badly documented areas of the new API. Will be updating this in the future, as I dive deeper into the latest API changes.

Including the SDK (Github)

Depending on what you want to do with the API, the above needs to be adjusted. Check the Facebook API documentation for more details.

Basic Login / User data retrieval

 

readmore

I had a problem with the tag pagination throwing 404 errors and was forced to integrate a custom query into the 404 page, while fixing the rewrite rules ;)

This is how you force a different HTTP response header with WordPress, in this case a simple HTTP/1.1 200 OK.

Some tweaking to add your own classes to the body tag

 

readmore

“countUp.js is a dependency-free, lightweight JavaScript “class” that can be used to quickly create animations that display numerical data in a more interesting way.”

Github

readmore

PHP

 Javascript

 

readmore

As part of our complete network upgrade, portalZINE.TV gets a complete facelift as well. The whole website has been streamlined in preparation for the new season.

portalZINE TV

readmore

1. Add Vimeo iframe

2. Load Froogaloop and add some Javascript

This will add a READY event for the player, which allows you to handle other stuff within that function from that point on. Like making the video responsive using fitVid for example :)

Its important that you reference the playerID in the actual iframe source or the ready function will never fire !

Vimeo Player API

readmore