Site logo

Archived topic

Anchor on image links in gallery

6 replies · Started by Sergey on December 7, 2018

Viewing posts 1–7 of 7

Hi everyone!
In image thumbnails, an anchor “#main” is added to the image link, which leads to the beginning of the current page.
Example page (gallery at the bottom of the page) - https://housedsgn.ru/transart-foundation/
How can I remove an anchor to the links in the gallery?
Thanks!

Hi there,

Is that a WordPress gallery? If so you should be able to edit the link<a href="https://housedsgn.ru/transart-foundation/neobychnyj-dom-dlja-hudozhnika/#main"> and just remove the the #main part.

Or am I missing something here?

Yes it's a WordPress gallery.
But anchor #main automatically added when loading media. How do i fix this for future uploads, and remove anchor from excisting links? Maybe there is a snippet or hook?

It seems I can not remove the anchor manually ...
Can't remove anchor from image link

Hmm GP doesn't do anything special from WordPress gallery - you can test by activating a default WP twenty series theme.

Maybe check your permalink settings?

Might also be another plugin that's causing this?

If not then you might have to raise a topic to WordPress support.

Yes Leo, you right!
The problem was in the smooth scrolling hook.
Thanks for the tip!

No problem :)

This archived topic is closed to new replies.