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.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only 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 custom post type WordPress pr... Enable custom post type WordPress preview. Source: https://woorkup.com/wordpress-custom-post-type/
    1
    //adds custom post type query var to preview links
    2
    function mycptname_cpt_previow_query_vars($link, $post) {
    3
    	$custom_post_types = array('artist');
    4
    	if(in_array($post->post_type, $custom_post_types)) {
    5
    		return add_query_arg(['post_type' => $post->post_type], $link);
  4. 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,
  5. GeneratePress author sidebar widget ... GeneratePress author sidebar widget box as seen here: https://woorkup.com/
    1
    <center><img src="https://domain.com/bio-pic.png" class="no-lazy" width="175" height="175" alt=""></center>
    2
    <div style="background:#FAF3D4; color: #5d5b54; margin: 15px 0; padding: 1em 1em; border-width: 0 0 0 12px;"><strong style="font-size:19px;">Hi there, I'm {name}. <a href="https://twitter.com/username" target="_blank" style="border-bottom:0px; color:#504e48;" rel="noopener noreferrer"><i class="fa fa-twitter fa-2x;" aria-hidden="true"></i></a></strong><br
    3
        /><span style="line-height:23px;font-size:18px;">Write something about you. <strong><a  style="color:#504e48; border-bottom: 2px solid rgba(80, 78, 72, 0.2);" href="https://domain.com/about/">Read more</a></strong></span></div>
  6. 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);