Complete Buyer's Guide to Paxil 20Mg Online | Everything You Need to Know
ID);
$category_name = $categories ? $categories[0]->name : 'Blog';
$category_url = $categories ? get_category_link($categories[0]->term_id) : home_url('/blog/');
$schema = array(
'@context' => 'https://schema.org',
'@type' => 'BreadcrumbList',
'itemListElement' => array(
array('@type' => 'ListItem', 'position' => 1, 'name' => 'Home', 'item' => home_url()),
array('@type' => 'ListItem', 'position' => 2, 'name' => $category_name, 'item' => $category_url),
array('@type' => 'ListItem', 'position' => 3, 'name' => get_the_title(), 'item' => get_permalink())
)
);
echo '';
}
// Add Article Schema for Blog Posts
add_action('wp_footer', 'inject_blog_article_schema');
function inject_blog_article_schema() {
if (!is_singular('post')) return;
$post = get_post();
$featured_image = get_the_post_thumbnail_url($post->ID, 'full');
$schema = array(
'@context' => 'https://schema.org',
'@type' => 'Article',
'headline' => get_the_title(),
'description' => get_the_excerpt() ?: wp_trim_words(get_the_content(), 30),
'author' => array('@type' => 'Person', 'name' => 'Dr. Sarah Mitchell', 'jobTitle' => 'Clinical Pharmacist'),
'publisher' => array('@type' => 'Organization', 'name' => 'Opioids Pharmacy', 'url' => home_url()),
'datePublished' => get_the_date('c'),
'dateModified' => get_the_modified_date('c'),
'mainEntityOfPage' => array('@type' => 'WebPage', '@id' => get_permalink())
);
if ($featured_image) $schema['image'] = array('@type' => 'ImageObject', 'url' => $featured_image);
echo '';
}
// Fix Author Name
add_filter('the_author', function($name) { return (is_singular('post') && (empty($name) || $name === 'admin')) ? 'Dr. Sarah Mitchell' : $name; });
// Add Meta Description
add_action('wp_head', function() {
if (!is_singular('post')) return;
$desc = get_the_excerpt() ?: wp_trim_words(get_the_content(), 30);
echo '' . \"
\";
echo '' . \"
\";
echo '' . \"
\";
}, 1);
