Title: Anchor offset
Last modified: March 16, 2020

---

# Anchor offset

 *  [culcram](https://wordpress.org/support/users/culcram/)
 * (@culcram)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/anchor-offset/)
 * I’ve been having what seems to be the same issue as the topic linked below, although
   not Avada theme…
 * [https://wordpress.org/support/topic/jump-anchors-need-adjusting-avada-theme/](https://wordpress.org/support/topic/jump-anchors-need-adjusting-avada-theme/)
 * I can see that a fix has been implemented and included with the plugin, but to
   the best of my knowledge ‘a-z-listing/scripts/a-z-listing-scroll-fix.js’ is not
   loaded in any way, so anchor links are doing their default of jumping to the 
   top of the window.
 * Have tried enqueueing it myself, however I have limited knowledge. Any assistance,
   or an update of the plugin would be greatly appreciated.
 * Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [culcram](https://wordpress.org/support/users/culcram/)
 * (@culcram)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/anchor-offset/#post-12617261)
 * Was I right in thinking that this is already part of the plugin and just not 
   loaded in any way?
 * If so, it would be great to get a fix asap. It’s one thing that a client (and
   my boss continue to mention!
 *  Plugin Author [Dani Llewellyn](https://wordpress.org/support/users/diddledani/)
 * (@diddledani)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/anchor-offset/#post-12641340)
 * Hi,
 * The script is present in the plugin as an example. It will need customisation
   to support each site. You can load it without customising it with the following
   in your theme’s functions.php:
 *     ```
       add_action( 'wp_enqueue_scripts', 'enqueue_a_z_scroll_fix' );
       function enqueue_a_z_scroll_fix() {
           wp_enqueue_script( 'a-z-scroll-fix', plugins_url( 'scripts/a-z-listing-scroll-fix.js', trailingslashit( WP_PLUGINS_DIR ) . 'a-z-listing/a-z-listing.php' ), array(), false, true );
       }
       ```
   
 * The best thing to do, however, is to copy the file into an appropriate location
   in your theme, add any customisations – you likely need to adjust the offset,
   and then load from there instead of from the plugin.
    -  This reply was modified 6 years, 1 month ago by [Dani Llewellyn](https://wordpress.org/support/users/diddledani/).
      Reason: Fix wp_enqueue_script() usage
 *  Thread Starter [culcram](https://wordpress.org/support/users/culcram/)
 * (@culcram)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/anchor-offset/#post-12670780)
 * Thanks. Although I had to amend it to the below:
 * `trailingslashit( WP_CONTENT_DIR ) . '/plugins/a-z-listing/a-z-listing.php'`
 * Can the offset be included on the Back to top links in any way??
 *  Plugin Author [Dani Llewellyn](https://wordpress.org/support/users/diddledani/)
 * (@diddledani)
 * [6 years ago](https://wordpress.org/support/topic/anchor-offset/#post-12683841)
 * To apply to the back-to-top links you’ll need to modify the javascript to also
   target those links.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Anchor offset’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/a-z-listing_d8edfd.svg)
 * [A-Z Listing](https://wordpress.org/plugins/a-z-listing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/a-z-listing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/a-z-listing/)
 * [Active Topics](https://wordpress.org/support/plugin/a-z-listing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/a-z-listing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/a-z-listing/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Dani Llewellyn](https://wordpress.org/support/users/diddledani/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/anchor-offset/#post-12683841)
 * Status: not resolved