Change the Author Slug from Username to Nickname

Hi to the community, is it possible to change the default username slug to nickname if is available? By default the url is something like: http://domain.tld/author/(admin) , is it possible to rewrite and change to http://domain.tld/author/(nickname) so if a user change his nickname from the profile page the slug it will change also to the … Read more

Change the “page” slug in pagination

Simple question. When pagination is activated, the URL changes to “site.com/page/2”. For my site, this should be “site.com/paggetto/2”. How can I change that rewrite rule? I also want to change “author” and other variables. 4 For some sites in German I use the following plugin to translate page to seite (the German word for page): … Read more

Theme localization of “slugs” (custom post types, taxonomies)

in my theme I want to define a series of custom post types and custom taxonomies, each one having its own customized slug; the base language of my theme is english, therefore the slugs will be in English language for example while defining the slug of custom post type “product” args: ‘rewrite’ => array( ‘slug’ … Read more

How does WordPress generate URL slugs?

Is there a page somewhere that details exactly how WordPress generates slugs for URLs? I’m writing a script that needs to generate URL slugs identical to the ones WordPress generates. 5 As per @SinisterBeard’s very valid comment to the question already a couple of years back now, this answer has long been outdated and the … Read more

How to get a taxonomy term name by the slug?

If I know a taxonomy term slug, how can I get that term’s name? 3 The function you are looking for is get_term_by. You would use it as such: <?php $term = get_term_by(‘slug’, ‘my-term-slug’, ‘category’); $name = $term->name; ?> This results in $term being an object containing the following: term_id name slug term_group term_taxonomy_id taxonomy … Read more