Filter Custom Post Types by Taxonomy in WP Admin Dashboard
Filter CPTs by a linked custom Taxonomy in the WP Admin Dashboard is possible with restrict_manage_posts. In the screenshot there is a CPT list of posts, with a dropdown menu of a linked custom taxonomy terms which are filterable via the filter button next to it. The code goes in functions.php View the code on…
Read MoreAdd Modern Tribe Event Categories as CSS classes in Event Posts
Event Categories are not added as CSS classes to individual Event Posts in the Modern Tribes Event Plugin for WordPress, however you can use the body_class filter to add them in. add_filter( ‘body_class’, ‘cp_event_taxonomy_in_body_class’ ); // Ref – https://theeventscalendar.com/support/forums/topic/add-category-name-as-body_class/ // Add event categories terms to body class of event posts function cp_event_taxonomy_in_body_class( $classes ){ global…
Read MoreChanging the Modern Tribe Events Date Format
This is some code borrowed and extended on to change the Modern Tribes Event plugins date output format to make it a bit easier on the eye than the default output. View the code on Gist. It is a shortcode [all_the_single_dates] that outputs the dates like so …. 09 – 14 September 2018 28 October…
Read MoreAdd Search & Filter Pro to Beaver Themer Post Module CPT Archive
You can use Search and Filter Pro with Beaver Builders Themer Post Module columns post layout, this guide goes through the tweaks needed and uses a CPT (custom post type) archive page. Create your Posts Module CPT Archive Page via Themer Create your Posts Module with the columns layout on a CPT…
Read MoreAdd Search & Filter Pro to Beaver Builder Masonry Grid
You can use Search and Filter Pro with Beaver Builders Themer Post Module grid masonry layout, this guide goes through the tweaks needed and used the main blog post archive page. Create your Posts Module Archive Page Create your Posts Module layout on the main Post Archive page with Beaver Themer and add in your…
Read MorejQuery replace an image on click
jQuery replace an image on click- example below, this is a method to swap numerous images in HTML by manipulating the images src attribute value from the click of another element such as a button. HTML <div class=”button-container”> <button class=”black-button”></button> <button class=”red-button”></button> <button class=”blue-button”></button> <button class=”yellow-button”></button> </div> <img id=”change-image” src=”/wp-content/uploads/2018/09/black.jpg” alt=”Black Image” /> jQuery jQuery(document).ready(function($){ $(‘.black-button’).on({…
Read MoreRemove WordPress Backend Dashboard Widgets
WordPress backend dashboard widgets can be annoying, dangerous, fugly or anxiety producing overload for those leaning to the OCD side. Or you may want to not have your client install Gutenberg from the Try Gutenberg widget and make life interesting or inadvertently visit the Customiser and wreck havoc on your design. Luckily you can remove…
Read MoreKeep Beaver Themer Sticky Header on Mobile & Tablet
By default the Beaver Themer Sticky Header Option only sticks to the head for large devices only and disappears at tablet and mobile size – this makes for better UX but when the sticky header is minimal it can be useful at all sizes, heres how you can do it. Make sure the row that…
Read MoreScript a WordPress Valet Install on macOS – bash/wp-cli/wp-cli-valet
By creating a bash script with wp-cli and wp-cli-valet commands on macOS you can create a streamlined and tailored WordPress install using Valet on your local development, this reduces repetitious tasks after a site installation – similar to a blueprint in other WP local developments. The type of tasks may include: Adding and activating a theme…
Read MoreGit Command Line References
A reference and collection of Git commands used on the command line… View the code on Gist.
Read More