This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
sub_filter 'https://secure.gravatar.com/avatar/' 'https://cdn.example.com/avatar/'; | |
sub_filter_once off; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /avatar { | |
proxy_pass https://secure.gravatar.com$request_uri; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'your_prefix_register_post_type' ); | |
function your_prefix_register_post_type() { | |
$args = [ | |
'label' => esc_html__( 'artists', 'text-domain' ), | |
'labels' => [ | |
'menu_name' => esc_html__( 'artists', 'your-textdomain' ), | |
'name_admin_bar' => esc_html__( 'Artist', 'your-textdomain' ), | |
'add_new' => esc_html__( 'Add artist', 'your-textdomain' ), | |
'add_new_item' => esc_html__( 'Add new artist', 'your-textdomain' ), | |
'new_item' => esc_html__( 'New artist', 'your-textdomain' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'show_in_rest' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function na_remove_slug( $post_link, $post, $leavename ) { | |
if ( 'artist' != $post->post_type || 'publish' != $post->post_status ) { | |
return $post_link; | |
} | |
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); | |
return $post_link; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//adds custom post type query var to preview links | |
function mycptname_cpt_previow_query_vars($link, $post) { | |
$custom_post_types = array('artist'); | |
if(in_array($post->post_type, $custom_post_types)) { | |
return add_query_arg(['post_type' => $post->post_type], $link); | |
} | |
return $link; | |
} | |
add_filter('preview_post_link', 'mycptname_cpt_previow_query_vars', 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bis_remove_cpt_slug($args, $post_type) { | |
if(in_array($post_type, array('artist'))) { | |
$args['rewrite'] = array('slug' => '/'); | |
} | |
return $args; | |
} | |
add_filter('register_post_type_args', 'bis_remove_cpt_slug', 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html {-webkit-font-smoothing: auto;} | |
/*fonts*/ | |
strong {color:#202020;} | |
/*no margin mobile*/ | |
@media screen and (max-width: 768px) { | |
.no-margin-mobile {margin-bottom:0px;}} | |
/*links*/ | |
#block-2 a {text-decoration:none;} | |
#block-2 {border: 1px solid rgba(0,0,0,.05); | |
box-shadow: 0 0 27px 0 rgb(214 231 233 / 52%); |