✍️
Writing
I craft actionable content derived from first-hand experience and develop performance-driven WordPress plugins. ⚡
-
forgemedia LLC
- Scottsdale, AZ
- https://forgemedia.io
- @brianleejackson
Pinned Loading
-
WordPress custom post type template....
WordPress custom post type template. Source: https://woorkup.com/wordpress-custom-post-type/ 1add_action( 'init', 'your_prefix_register_post_type' );
2function your_prefix_register_post_type() {3$args = [
4'label' => esc_html__( 'artists', 'text-domain' ),
5'labels' => [
-
Remove base slug from custom post ty...
Remove base slug from custom post type URL. Source: https://woorkup.com/wordpress-custom-post-type/ 1function na_remove_slug( $post_link, $post, $leavename ) {23if ( 'artist' != $post->post_type || 'publish' != $post->post_status ) {4return $post_link;
5}
-
Enable WordPress block editor suppor...
Enable WordPress block editor support on custom post type. Source: https://woorkup.com/wordpress-custom-post-type/ 1'show_in_rest' => true,
-
Exclude logo (desktop and mobile) fr...
Exclude logo (desktop and mobile) from lazy load in GeneratePress theme with Perfmatters plugin. Source: https://perfmatters.io/docs/lazy-load-wordpress/ *Update* This is no longer needed as you can add class exclusions in Perfmatters. 1//add no-lazy class to primary logo2function wpd_generate_logo_output($output, $logo_url, $html_attr) {
34//add our no-lazy class5$html_attr = str_replace('class="', 'class="no-lazy ', $html_attr);
-
Disable fetch priority on GB mega menu
Disable fetch priority on GB mega menu 1/**2* Prevent GenerateBlocks from forcing high priority/eager loading in overlays (Mega Menus)3*/4add_filter( 'generateblocks_pro_overlay_allow_lazy_load', '__return_true' );
-
Fix Divi CLS (make sure to also excl...
Fix Divi CLS (make sure to also exclude it from Delay and Defer JS). 1<script type="text/javascript">
2var elm=document.getElementsByTagName("html")[0];3elm.style.display="none";
4document.addEventListener("DOMContentLoaded",function(event) {elm.style.display="block"; });5</script>
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.

