current progress

This commit is contained in:
prospect
2023-12-26 22:56:58 -05:00
commit 7843c7b084
99 changed files with 42808 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
function open_graph_twitter_card()
{
// Get the post or page ID
$post_id = get_the_ID();
// Get the post or page title
$title = get_the_title($post_id);
// Get the post or page excerpt (description)
$description = (get_the_excerpt()) ? get_the_excerpt() : get_bloginfo('description');
// Get the post or page URL
$url = get_permalink($post_id);
// Set default image url
$default_image_url = get_theme_file_uri('/screenshot.png');
// Get the post thumbnail (featured image) URL
$thumbnail = get_the_post_thumbnail_url($post_id);
?>
<!-- Open Graph meta tags -->
<meta property="og:title" content="<?php echo $title . ' - ' . get_bloginfo('name'); ?>" />
<meta property="og:description" content="<?php echo $description ?>" />
<meta property="og:url" content="<?php echo $url ?>" />
<meta property="og:image" content="<?php echo $default_image_url ?>" />
<!-- Twitter Card meta tags -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="<?php echo $title . ' - ' . get_bloginfo('name'); ?>" />
<meta name="twitter:description" content="<?php echo $description ?>" />
<meta name="twitter:image" content="<?php echo $default_image_url ?>" />
<?php
}