This repository has been archived on 2024-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
2020-12-30 19:04:58 +01:00
|
|
|
<?php if ( is_single() ) { ?>
|
|
|
|
<?php if(!has_post_thumbnail( $post->ID )) {
|
2023-10-04 13:36:05 +02:00
|
|
|
$image = get_template_directory_uri() . "/img/deiconult-preview.png";
|
2020-12-30 19:04:58 +01:00
|
|
|
} else {
|
|
|
|
$image = get_the_post_thumbnail_url();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<meta property='og:url' content='<?php echo get_permalink(); ?>'/>
|
|
|
|
<meta property='og:type' content='article'/>
|
|
|
|
<meta property='og:title' content='<?php wp_title(''); ?>'/>
|
|
|
|
<meta property='og:site_name' content='<?php bloginfo('name'); ?>'/>
|
|
|
|
<meta property='og:image' content='<?php echo $image ?>'/>
|
|
|
|
<meta property='og:description' content='<?php the_excerpt(); ?>'/>
|
2023-10-04 13:36:05 +02:00
|
|
|
<?php } else { ?>
|
|
|
|
<meta property='og:url' content='<?php echo get_site_url(); ?>'/>
|
|
|
|
<meta property='og:type' content='siteweb'/>
|
|
|
|
<meta property='og:title' content='<?php bloginfo('name'); ?>'/>
|
|
|
|
<meta property='og:site_name' content='<?php bloginfo('name'); ?>'/>
|
|
|
|
<meta property='og:image' content='<?php echo get_template_directory_uri() . "/img/deiconult-preview.png"; ?>'/>
|
|
|
|
<meta property='og:description' content='<?php bloginfo('description'); ?>'/>
|
2020-12-30 19:04:58 +01:00
|
|
|
<?php } ?>
|