Rewrite/Change custom taxonomy slug

Try using the below code to overwrite arguments of already registered taxonomies. function wp_modify_taxonomy() { // get the arguments of the already-registered taxonomy $custom_category_args = get_taxonomy( ‘genre’ ); // make changes to the args $custom_category_args->rewrite[‘slug’] = ‘chambers’; $custom_category_args->rewrite[‘with_front’] = false; // re-register the taxonomy register_taxonomy( ‘genre’, ‘chambers’, (array) $custom_category_args ); } add_action( ‘init’, ‘wp_modify_taxonomy’, 11 … Read more

Adding a custom field to a slug

Try to use function sanitize_title() – documentation, which converts a string into a slug when you check if it is already in the permalink, and when appending it to permalink: function custom_job_post_type_link( $post_id, $post ) { $permalink = $post->post_name; $companyname = $post->_company_name; if ( strpos( $permalink, sanitize_title($companyname) ) ) { // <– Here return; } … Read more

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