Skip to content
View brianleejackson's full-sized avatar
✍️
Writing
✍️
Writing

Block or report brianleejackson

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. WordPress custom post type template.... WordPress custom post type template. Source: https://woorkup.com/wordpress-custom-post-type/
    1
    add_action( 'init', 'your_prefix_register_post_type' );
    2
    function your_prefix_register_post_type() {
    3
    	$args = [
    4
    		'label'  => esc_html__( 'artists', 'text-domain' ),
    5
    		'labels' => [
  2. Remove base slug from custom post ty... Remove base slug from custom post type URL. Source: https://woorkup.com/wordpress-custom-post-type/
    1
    function na_remove_slug( $post_link, $post, $leavename ) {
    2
    
                  
    3
        if ( 'artist' != $post->post_type || 'publish' != $post->post_status ) {
    4
            return $post_link;
    5
        }
  3. 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,
  4. 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 logo
    2
    function wpd_generate_logo_output($output, $logo_url, $html_attr) {
    3
      
    4
      //add our no-lazy class
    5
      $html_attr = str_replace('class="', 'class="no-lazy ', $html_attr);
  5. 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
     */
    4
    add_filter( 'generateblocks_pro_overlay_allow_lazy_load', '__return_true' );
  6. 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">
    2
    var elm=document.getElementsByTagName("html")[0];
    3
    elm.style.display="none";
    4
    document.addEventListener("DOMContentLoaded",function(event) {elm.style.display="block"; });
    5
    </script>