Title: Permalink numbering
Last modified: October 5, 2018

---

# Permalink numbering

 *  Resolved [Henk Barreveld](https://wordpress.org/support/users/henk-barreveld/)
 * (@henk-barreveld)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/permalink-numbering/)
 * Hello,
 * I have a question about something that I think other happy users of Duplicate
   Post may have as well and there may be a solution – but I cannot find it.
 * On this website a new post ‘Star Magazine Online’ is created once (sometimes 
   twice) per week, by duplicating the previous post and editing the content. Every
   time the permalink is extended with “-2” unless, of course, you change the permalink
   manually.
 * It would be really nice if, instead of
    star-magazine-online-234-2-2-2-2-2-2-
   2-2-2 star-magazine-online-234-2-2-2-2-2-2-2-2-2-2 star-magazine-online-234-2-
   2-2-2-2-2-2-2-2-2-2 star-magazine-online-234-2-2-2-2-2-2-2-2-2-2-2-2 … (all automatically)
   I could get star-magazine-online-235 (changed manually, ok) star-magazine-online-
   236 (automatically) star-magazine-online-237 star-magazine-online-238 …
 * Is that possible?
 * Thank you in advance for your help!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpermalink-numbering%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [yondemon](https://wordpress.org/support/users/yondemon/)
 * (@yondemon)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/permalink-numbering/#post-11031990)
 * Maybe is a wrong aproximation, but since slug is automatically generated by WordPress
   and this plugin is only copying the slug from original post and letting wp do
   the job, I cleanup the slug to the first so wp assigns correctly the new number.
 * duplicate-post-admin.php:601
 *     ```
       	$post_name = $post->post_name;
       	if(get_option('duplicate_post_copyslug') != 1){
       		$post_name = '';
       	} else {
       		$result = preg_match( "/(.*)-\d*$/", $post_name, $matches);
       		if($result){
       			$post_name = $matches[1];
       		}
       	}
       ```
   
 * Side effects: posts with a number at the end are cleaned up as well…
    -  This reply was modified 7 years, 5 months ago by [yondemon](https://wordpress.org/support/users/yondemon/).
    -  This reply was modified 7 years, 5 months ago by [yondemon](https://wordpress.org/support/users/yondemon/).

Viewing 1 replies (of 1 total)

The topic ‘Permalink numbering’ is closed to new replies.

 * ![](https://ps.w.org/duplicate-post/assets/icon-256x256.png?rev=2336666)
 * [Yoast Duplicate Post](https://wordpress.org/plugins/duplicate-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicate-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicate-post/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicate-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicate-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicate-post/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [yondemon](https://wordpress.org/support/users/yondemon/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/permalink-numbering/#post-11031990)
 * Status: resolved