Add taxonomy or category slug to custom post types URL

You would do it by assigning the taxonomies when registering the post type:

'taxonomies' => [ 'taxonomy1', 'taxonomy2', ..etc ],

You can also use register_taxonomy_for_object_type to do this if you want a function call. You still need to register the taxonomies though or this won’t work.

Note that this won’t change your CPT’s permalinks, but that’s a separate question that has been asked many times on the site already.

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