Reset WPML Capabilities

While working on a project using WPML and user role editor, I ran into an issue where I could no longer access certain admin areas of WPML – with my administrator account. I needed a way to recreate the default WPML capabilities. Run this script as a plugin, navigate to any admin page, and then deactivate and uninstall.

Email Forwarding Is A Bad Idea

Forwarding email is re-sending mail from one mailbox to another and can be a problematic practice. Here’s why you should avoid email forwarding.

Change image sizes using filter

In a typical GeneratePress setup, the image sizes are set in the customizer and apply to all “post” type posts. Using conditional logic, this filter sets the image sizes for other areas of the site, such as custom post type archives, taxonomies, etc.

WPML support for post type switcher plugin

Post Type Switcher is an excellent plugin that allows you to easily move a post from one post type to another. However, the plugin does not work with WPML due to the way WPML stores its translations. Adding this small code snippet to the plugin’s PHP file makes it compatible.  Open “Post Type Switcher” plugin PHP file It is located at wp-content/plugins/post-type-switcher/post-type-switcher.php Find lines Add this code above Source: https://www.grzegorowski.com/wordpress-wmpl-post-type-switcher-support/

Force iThemes Sync to Show in WordPress Admin

Once in a while, I need to disconnect and then reconnect iThemes Sync because of a problem. This can be a problem if the Sync dashboard shows ‘Site Down’ and you can not see the plugin in the WordPress admin because it is set to hidden. The following snippet will temporarily force the plugin to show in the WordPress admin for you to reconnect. Enter the url into your browser url bar. http://yoursite.com/wp-admin/plugins.php?ithemes-sync-force-display=1

Angled divs with SCSS

I recently worked on a project where the design called for a slanted or angled div. This was achievable using some CSS selector magic. The following scss snippet easily creates angled divs for you.

Add user instructions to featured image metabox

In this article, I’ll show you how to add custom user instructions just below the featured image metabox, to help make it easier for end-users to upload a featured image that won’t break the design.