WordPress Integration
Ghost is our primary integration — these docs cover the WordPress basics.
Before you start
- Create a brand kit at /dashboard/kits/new
- Create an API token at /dashboard
- Copy your token
Via functions.php
Add the following to your theme’s functions.php, or a site-specific plugin:
add_action('wp_head', function() {
if (is_single()) {
$title = urlencode(get_the_title());
$token = 'YOUR_TOKEN_HERE';
$url = 'https://socialcard.studio/api/v1/og?token=' . $token . '&title=' . $title;
echo '<meta property="og:image" content="' . esc_attr($url) . '">';
echo '<meta name="twitter:image" content="' . esc_attr($url) . '">';
}
});Replace YOUR_TOKEN_HERE with the token you copied above.
If you use Yoast SEO, you can also set a custom OG image URL in the post editor under the Social tab — paste the full endpoint URL with your token and post title substituted in.
Troubleshooting
If cards show a placeholder instead of your branded card, check your dashboard health page for a breakdown of recent render results and any configuration issues.
Need help? Email support@socialcard.studio