Title: Permalinks help
Last modified: August 19, 2016

---

# Permalinks help

 *  Resolved [alev](https://wordpress.org/support/users/alev/)
 * (@alev)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/permlinks/)
 * Hi everyone
    Ok here is problem I have been using this ” /index.php/%year%/%monthnum%/%
   day%/%postname%/ ” permalinks code for site with static pages and it woks fine,
   I no longer have to see links ID # but as soon as I use this all the post links
   are lost ( broken). Any way I can have both working so all the posts as pages
   are will be using post/page name and not index ID number
 * I appreciate any suggestions.
 * Thank you in advance
 * Lev

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

 *  [extatix](https://wordpress.org/support/users/extatix/)
 * (@extatix)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/permlinks/#post-1727550)
 * I had this too when changing permalinks, adding this to my functions.php worked:
 *     ```
       flush_myrewrite_rules();
       function flush_myrewrite_rules() {
           global $wp_rewrite;
           $wp_rewrite->flush_rules();
       }
       ```
   
 *  Thread Starter [alev](https://wordpress.org/support/users/alev/)
 * (@alev)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/permlinks/#post-1727607)
 * So you use same permalink code and just add scrip you are showing in functions.
   php . is there an specific place it has to be?
 *  [extatix](https://wordpress.org/support/users/extatix/)
 * (@extatix)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/permlinks/#post-1727611)
 * No, not specific.
    But I call it in an init-function btw.
 *     ```
       function flush_myrewrite_rules() {
           global $wp_rewrite;
           $wp_rewrite->flush_rules();
       }
       add_action('init', 'flush_myrewrite_rules');
       ```
   
 *  Thread Starter [alev](https://wordpress.org/support/users/alev/)
 * (@alev)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/permlinks/#post-1727618)
 * Thanx extatix
    It working fine Thank you very much
 * Lev

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

The topic ‘Permalinks help’ is closed to new replies.

## Tags

 * [pages](https://wordpress.org/support/topic-tag/pages/)
 * [perma-links](https://wordpress.org/support/topic-tag/perma-links/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [alev](https://wordpress.org/support/users/alev/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/permlinks/#post-1727618)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
