| | |
| | | <?php |
| | | namespace JVBase\managers; |
| | | |
| | | use JVBase\meta\MetaManager; |
| | | use JVBase\meta\Meta; |
| | | use WP_Query; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; // Exit if accessed directly |
| | | } |
| | | /** |
| | | * @deprecated use JVBase\managers\seo\SEO.php |
| | | * Schema.org Generator for edmonton.ink |
| | | * |
| | | * This class generates structured schema.org data for better SEO |
| | |
| | | */ |
| | | private function getArtistSchema(int $post_id):array |
| | | { |
| | | $meta = new MetaManager($post_id, 'post'); |
| | | $meta = Meta::forPost($post_id); |
| | | $metaValues = $meta->getAll(); |
| | | |
| | | $permalink = get_permalink($post_id); |
| | | |
| | | // Get artist data |
| | | $name = get_the_title($post_id); |
| | | $first_name = $meta->getValue('first_name'); |
| | | $bio = $meta->getValue('bio'); |
| | | $short_bio = $meta->getValue('short_bio'); |
| | | $first_name = $meta->get('first_name'); |
| | | $bio = $meta->get('bio'); |
| | | $short_bio = $meta->get('short_bio'); |
| | | $description = $short_bio ?: wp_strip_all_tags($bio) ?: get_the_excerpt($post_id); |
| | | |
| | | // Build person schema |
| | |
| | | */ |
| | | private function getShopSchema(int $term_id): array |
| | | { |
| | | $meta = new MetaManager($term_id, 'term'); |
| | | $meta = Meta::forTerm($term_id); |
| | | $metaValues = $meta->getAll(); |
| | | $term = get_term($term_id, BASE.'shop'); |
| | | $permalink = get_term_link($term_id, BASE.'shop'); |
| | |
| | | [ |
| | | '@type' => 'LocalBusiness', |
| | | '@id' => $permalink . '#organization', |
| | | 'name' => $term->name, |
| | | 'description' => $meta->getValue('short_bio') ?: $term->description, |
| | | 'name' => html_entity_decode($term->name), |
| | | 'description' => $meta->get('short_bio') ?: $term->description, |
| | | 'url' => $permalink, |
| | | 'priceRange' => '$$', // Default price range |
| | | 'additionalType' => 'https://schema.org/TattooParlor', // Custom business type |
| | |
| | | */ |
| | | private function getStyleSchema(int $term_id):array |
| | | { |
| | | $meta = new MetaManager($term_id, 'term'); |
| | | $meta = Meta::forTerm($term_id); |
| | | $term = get_term($term_id, BASE.'style'); |
| | | $permalink = get_term_link($term_id, BASE.'style'); |
| | | |
| | |
| | | [ |
| | | '@type' => 'CreativeWork', |
| | | '@id' => $permalink . '#style', |
| | | 'name' => $term->name, |
| | | 'description' => $meta->getValue('characteristics') ?: $term->description, |
| | | 'name' => html_entity_decode($term->name), |
| | | 'description' => $meta->get('characteristics') ?: $term->description, |
| | | 'url' => $permalink, |
| | | 'mainEntityOfPage' => [ |
| | | '@type' => 'WebPage', |
| | |
| | | */ |
| | | private function getThemeSchema(int $term_id):array |
| | | { |
| | | $meta = new MetaManager($term_id, 'term'); |
| | | $meta = Meta::forTerm($term_id); |
| | | $term = get_term($term_id, BASE.'theme'); |
| | | $permalink = get_term_link($term_id, BASE.'theme'); |
| | | |
| | | $schema = [ |
| | | '@type' => 'CreativeWork', |
| | | '@id' => $permalink . '#theme', |
| | | 'name' => $term->name, |
| | | 'description' => $meta->getValue('description') ?: $term->description, |
| | | 'name' => html_entity_decode($term->name), |
| | | 'description' => $meta->get('description') ?: $term->description, |
| | | 'url' => $permalink, |
| | | 'mainEntityOfPage' => [ |
| | | '@type' => 'WebPage', |
| | |
| | | */ |
| | | private function getPartnerSchema(int $post_id):array |
| | | { |
| | | $meta = new MetaManager($post_id, 'post'); |
| | | $meta = Meta::forPost($post_id); |
| | | $metaValues = $meta->getAll(); |
| | | $permalink = get_permalink($post_id); |
| | | |
| | |
| | | private function getHomeSchema():array |
| | | { |
| | | // Main dataset schema for homepage |
| | | $schema = [ |
| | | '@type' => 'WebPage', |
| | | '@id' => get_home_url() . '/#webpage', |
| | | 'url' => get_home_url(), |
| | | 'name' => get_bloginfo('name') . ' | Edmonton\'s Best Tattoo Artists', |
| | | 'description' => 'Discover Edmonton\'s top tattoo artists, shops, and styles. Your comprehensive guide to Edmonton\'s tattoo scene.', |
| | | 'isPartOf' => [ |
| | | '@id' => get_home_url() . '/#website' |
| | | ], |
| | | 'about' => [ |
| | | '@type' => 'Dataset', |
| | | 'name' => 'Edmonton Tattoo Artist Directory', |
| | | 'description' => 'Comprehensive directory of professional tattoo artists in Edmonton, Alberta', |
| | | 'creator' => [ |
| | | '@id' => 'https://legacytattooremoval.ca/#organization' |
| | | ], |
| | | 'publisher' => [ |
| | | '@id' => 'https://legacytattooremoval.ca/#organization' |
| | | ] |
| | | ], |
| | | ]; |
| | | |
| | | return $schema; |
| | | return [ |
| | | '@type' => 'WebPage', |
| | | '@id' => get_home_url() . '/#webpage', |
| | | 'url' => get_home_url(), |
| | | 'name' => get_bloginfo('name') . ' | Edmonton\'s Best Tattoo Artists', |
| | | 'description' => 'Discover Edmonton\'s top tattoo artists, shops, and styles. Your comprehensive guide to Edmonton\'s tattoo scene.', |
| | | 'isPartOf' => [ |
| | | '@id' => get_home_url() . '/#website' |
| | | ], |
| | | 'about' => [ |
| | | '@type' => 'Dataset', |
| | | 'name' => 'Edmonton Tattoo Artist Directory', |
| | | 'description' => 'Comprehensive directory of professional tattoo artists in Edmonton, Alberta', |
| | | 'creator' => [ |
| | | '@id' => 'https://legacytattooremoval.ca/#organization' |
| | | ], |
| | | 'publisher' => [ |
| | | '@id' => 'https://legacytattooremoval.ca/#organization' |
| | | ] |
| | | ], |
| | | ]; |
| | | } |
| | | |
| | | /** |