A Quick Look at How the WordPress “Log Out Everywhere” Button Works

Published by John on October 28, 2019

I got an email from a client that I do Wordpress development for about performance impacts of the “Log Out Everywhere”, which appears in the back end of Wordpress when you are editing a user. I realized that I wasn’t overly familiar with how Wordpress sessions work, so took this as an opportunity to dig into how the actual session gets saved in the database.

Read More  |  Add Comment

Adding a Trailing Slash to CMS Pages in Magento 2

Published by John on October 9, 2019

One of my clients is migrating their Magento 1 website to Magento 2. One feature that is a bit tricky is adding a trailing slash to the end of CMS Pages. For Categories and Products, this is not an issue, but it isn’t as straightforward for CMS Pages.

I wrote an observer that you can plugin to your custom Magento 2 plugin to automatically add the trailing slash to CMS Pages when they are saved, which I think is the simplest and non-obtrusive way of addressing this issue. However, if you know a better/easier way, please feel free to leave a comment.

Read More  |  Add Comment

Magento 2: Targeting a Specific CMS Page using Layout.XML

Published by John on September 1, 2019

With Magento 2, adding a layout update usually starts with creating an XML file, using the layout handle of the item you are trying to target. For example, if you wanted to make a change to all category pages, you could create a file named ‘catalog_category_view.xml’ and then add all your updates to it.

For CMS pages, you can do a general update to ALL cms pages or target a specific page by using the identifier(URL Key) of the CMS page.

Read More  |  Add Comment

Hiding WordPress’s ‘PHP Update Required’ Dashboard Warning

Published by John on August 27, 2019

Wordpress has started reporting that PHP Version 5.6 is not supported and adds a nag to the admin dashboard, saying that PHP needs to be updated and “WordPress has detected that your site is running on an insecure version of PHP.”

While it is better to upgrade PHP to version 7, if for some reason you want to hide this box, you can do so by removing the ‘dashboard_php_nag’ meta box.

Read More  |  Add Comment

HTML 5 Video not Playing on Mobile Safari

Published by John on August 26, 2019

I ran into an issue last week, where an autoplaying HTML5 video was working in all browsers and devices, except for apple devices, including the iPad, iPhone, and also desktop’s running Safari. Chrome, Firefox, Android, and other browsers were not affected. However, even when accessing the video directly, the iPhone would not play it.

After a lot of troubleshooting the encoding method, video tag, and a lot of other debugging, I determined that it wasn’t actually related to the server or video, but was because the site was using cloudflare. A simple htaccess update was able to fix this, although long term using a CDN to serve the video may be a better choice.

Read More  |  Add Comment

Next Page »