Function to rewrite URl in WordPress

Have a look at the Permalink settings in the admin, you should be able to achieve what you want there. Here is a link to the Permalink Codex

something like /%post_id% should do the job, if you select the ‘Custom Structure’ option.

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