Howdy! I’ve added a custom menu item on the listing page, “Gallery”.
I’ve then added a custom ID to the listing-images.php
via a child theme:
All working great, apart from when there’s no images on a listing. As the ID doesn’t exist, the anchor link doesn’t work.
Now, I’ve also got Reviews enabled and when there’s a review, the “Reviews” menu item appears and where there aren’t any, it doesn’t.
I know this will be a customisation but I’m just looking for where I can find the logic that makes the Reviews toggle work so I can (hopefully) take that and make it work for my custom Gallery link.
Just looking for a point in the right direction