Categories
Code Snippets WordPress

How To Change The Order of Custom Post Type On Admin Edit Screen

I have been working on a new plugin that utilizes the new Gutenberg, blocks editor. I wanted to change the order of the custom posts on the edit screen so that they are not ordered by name, as shown below.   Since the posts on the edit screen are displayed from wp_query I filtered pre_get_posts […]

Categories
Code Snippets WordPress

WooCommerce Shipping Options Based on Weight

WooCommerce shipping options based on weight can be accomplished by creating a callback function for the woocommerce_cart_shipping_packages filter. The filter hook allows you to make a change to the cart package such as conditional shipping options based on shipping class, location, or weight. To get the weight of all the products in the shopping cart […]

Categories
Code Snippets jQuery WordPress

Mobile Friendly Menu

In this tutorial I explain how to create a mobile friendly menu for the iThemes Builder theme. By default the menu will wrap on smaller screens. When the menu wraps it is not very mobile friendly. In your child theme directory create a new file for some jQuery. You can call it what you want […]

Categories
Code Snippets jQuery

Replace Smart Quotes With Straight Quotes

I created a web app that uses ckEditor as the rich text editor. It works perfectly except when you copy and paste text that includes smart quotes and other special symbols. CkEditor converts the smart quotes to HTML entities, which would be fine in a normal situation. The Html entities caused a problem when it […]