*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Sophia After Dark
* @since 1.0.0
*/
?>
>
' . "\n", esc_url( $home_og_image ) );
}
printf( '
' . "\n", esc_attr( get_bloginfo( 'name' ) . ' - ' . get_bloginfo( 'description' ) ) );
printf( '
' . "\n", esc_attr( $author_bio ) );
printf( '
' . "\n", esc_url( home_url( '/' ) ) );
} elseif ( is_singular() ) {
global $post;
$thumbnail_url = get_template_directory_uri() . '/assets/images/default-og-image.webp';
if ( has_post_thumbnail( $post?->ID ) ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'og-image-size' );
if ( ! empty( $image[0] ) ) {
$thumbnail_url = $image[0];
}
}
printf( '
' . "\n", esc_url( $thumbnail_url ) );
printf( '
' . "\n", esc_attr( get_the_title() ) );
printf( '
' . "\n", esc_attr( get_the_excerpt() ) );
printf( '
' . "\n", esc_url( get_permalink() ) );
}
wp_head();
?>
>