Title: Move page down on load
Last modified: August 19, 2016

---

# Move page down on load

 *  Resolved [blong](https://wordpress.org/support/users/blong/)
 * (@blong)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/move-page-down-on-load/)
 * When my page is loaded, I would like it to automatically move down to my post.
   I have seen ways to do this using anchor tags and some javascript but I can’t
   seem to get it to work. I don’t know if I have been placing the code in the wrong
   places or something. Does anyone know how to do this or know any other method?
 * I am using the twenty-ten theme.
 * Any help is greatly appreciated 🙂

Viewing 1 replies (of 1 total)

 *  Thread Starter [blong](https://wordpress.org/support/users/blong/)
 * (@blong)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/move-page-down-on-load/#post-1998767)
 * Ok I figured it out.
    For anyone with the same problem here’s what I did:
 * in the header, add
 *     ```
       <script type="text/javascript">
   
       function goToAnchor() {
       location.href ="#myAnchor";
       }
   
       </script>
       ```
   
 * between the head tags, right after the title.
 * next change the body tag from
    `<body <?php body_class(); ?>>` to `<body onload
   ="goToAnchor();" <?php body_class(); ?>>`
 * and then open loop.php and add
    `<a name="myAnchor"></a>` right before the loop
   begins.
 * That’s it! I’m still not exactly sure what I had wrong before
    but it’s working
   now 🙂

Viewing 1 replies (of 1 total)

The topic ‘Move page down on load’ is closed to new replies.

## Tags

 * [anchor](https://wordpress.org/support/topic-tag/anchor/)
 * [down](https://wordpress.org/support/topic-tag/down/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [load](https://wordpress.org/support/topic-tag/load/)
 * [move](https://wordpress.org/support/topic-tag/move/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [scroll](https://wordpress.org/support/topic-tag/scroll/)
 * [twenty ten](https://wordpress.org/support/topic-tag/twenty-ten/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [blong](https://wordpress.org/support/users/blong/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/move-page-down-on-load/#post-1998767)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
