From 9bbeea742424837fb58207d88e10dbca0b2cae04 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 03 May 2026 22:04:17 +0000
Subject: [PATCH] =SEO Field registration and formatting
---
inc/utility/Image.php | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/inc/utility/Image.php b/inc/utility/Image.php
index df5c2f3..83b95e7 100644
--- a/inc/utility/Image.php
+++ b/inc/utility/Image.php
@@ -72,8 +72,17 @@
if ($addLink) {
if (!$postSlug) {
- global $post;
- $postSlug = $post->post_name;
+ if (is_singular()) {
+ global $post;
+ $postSlug = $post->post_name;
+ }else if (is_tax()) {
+ $tax = get_queried_object();
+ $postSlug = jvbNoBase($tax->taxonomy);
+ }elseif (is_post_type_archive()) {
+ $obj = get_queried_object();
+ $postSlug = jvbNoBase($obj->post_type);
+ }
+
}
$full = wp_get_attachment_image_src($ID, 'full');
--
Gitblit v1.10.0