WordPress post-type create url rewriting

You don’t need a URL rewrite. WP will show the single work post by default using the single-work.php template.

Go to Settings > Permalinks and select Custom Structure there. Put this rule in the text input:

/%post_id%/%postname%

And save the settings.

This should work for you.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)