This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
.site-logo img { | |
width: 155px; | |
} |
This file contains hidden or 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_filter( 'generate_post_date_output', function( $output, $time_string ) { | |
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">Published on %2$s</time>'; | |
if ( get_the_date() !== get_the_modified_date() ) { | |
$time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">Updated on %4$s</time>'; | |
} | |
$time_string = sprintf( $time_string, | |
esc_attr( get_the_date( 'c' ) ), | |
esc_html( get_the_date() ), |
This file contains hidden or 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( 'wp_enqueue_scripts','tu_remove_google_fonts', 10 ); | |
function tu_remove_google_fonts() { | |
wp_dequeue_style( 'generate-fonts' ); | |
} |
This file contains hidden or 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 wpseo_cdn_filter( $uri ) { | |
return str_replace( 'https://domain.com', 'https://cdn.domain.com', $uri ); | |
} | |
add_filter( 'wpseo_xml_sitemap_img_src', 'wpseo_cdn_filter' ); |
This file contains hidden or 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_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' ); | |
function tu_excerpt_metabox_more( $excerpt ) { | |
$output = $excerpt; | |
$settings = wp_parse_args( | |
get_option( 'generate_blog_settings', array() ), | |
generate_blog_get_defaults() | |
); | |
if ( has_excerpt() ) { | |
$output = sprintf('%1$s <br /><a class="read-more" href="%2$s">%3$s →</a>', |