In-page anchors blocked by WordPress banners

  • Unknown's avatar

    The “Create your website at WordPress.com Get started” banner and the admin toolbar are standard components on WordPress, but strange as it is, many themes don’t consider there’s a fixed banner on the top.
    When I insert markdown footnotes in the posts, the anchors’ locations are always blocked by the banner, which is really annoying.

    This can be fixed with simple css styles. I hope WordPress can include the offsetting solutions together with its ad banners.

  • Unknown's avatar

    Hi laneearashi,

    When I insert markdown footnotes in the posts, the anchors’ locations are always blocked by the banner, which is really annoying.

    Would you able to send a link to a post where this is happening? It looks like this may be an issue our developers are already aware of but seeing the problem in action will confirm this and provide an example to pass on.

    Thanks!

  • Unknown's avatar

    Hi, here’s a link https://tabularasa.data.blog/about/

    I’m also using VSCode as my local markdown editor and I noticed that the output html from VSCode have different classes from WordPress, so I put both examples. (Both of them have this issue though.)

    Thank you!

  • At the moment, we don’t have a good way around this. We are actively looking into solutions though.

  • Unknown's avatar

    This might not be a general solution but I think it works on simple themes like above?

    :target {
    padding-top: 40px;
    }

  • It will work on a lot of themes, but not all. If it works on your theme, go for it! :)

  • The topic ‘In-page anchors blocked by WordPress banners’ is closed to new replies.