From 275c0d74cd68677622a5431505c5c870c473063d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 29 Mar 2026 21:40:15 +0000
Subject: [PATCH] =Seems to be working, huzzah! Added some changes for on-this-page nav
---
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