A few lowercase words separated by dashes, describing a post and usually derived from the post title to create a user-friendly (that is readable and without confusing characters) permalink. Post slug substitutes the `%posttitle%` placeholder in a custom permalink structure. Post slug should not be ...

learn more… | top users | synonyms

0
votes
2answers
2k views

Get taxonomy slug from url

Sorry I'm new to taxonomies & trying to learn quickly. I've set up sectors and assigned a post to it. If I go to the post, I can see the URL has www.mydomain.com/sectors/auto/ How can I get auto ...
1
vote
2answers
385 views

Is using %postname% for permalinks really that bad for performance?

I've seen in various places, including the Wordpress admin and on this page, that using string based identifiers is "strongly not recommended for performance reasons". I understand that looking up a ...
3
votes
2answers
1k views

How to check if a slug exists?

I have a arbitrary string and want to check if a post with that slug string exists in the site. I tried to find a way to list all slugs, but can't find such a thing. Thanks
0
votes
1answer
337 views

Get plugin download URL from slug

Is there a way to take a plugin slug (e.g. 'akismet') of a plugin that is NOT currently installed and somehow retrieve the download URL of the current version (e.g. ...
1
vote
1answer
602 views

Slugs as breadcrumbs for Pages

I´m trying to create a function that creates a breadcrumb trail of Page slugs outside of The Loop. These breadcrumbs show the path from the homepage to the current (sub)page. For example, on the ...
1
vote
1answer
861 views

Setting a title on a Custom Post Type that doesn't support titles

I have a CPT called "profile" that only supports the editor and thumbnail. Each user is limited to posting just 1 profile. I'm looking for a way to prefill the title and slug fields with the display ...
0
votes
1answer
345 views

add slug of child(ren) to li using wp_list_pages

For a page template I am trying to include the 3 children of each page. That works fine. However as I want to include a different image for each of the children, I would like to add the slug of each ...
0
votes
1answer
685 views

Function to list all post slugs for every post in my WP database?

Function to list all post slugs for every post in wp_posts table? I assume there's an official function to generate a post slug, but maybe someone here already has the answer.
3
votes
1answer
773 views

The same slug in multiple taxonomies

We have a project that uses several custom taxonomies, and we're finding that the client wants to add the same term in several of them. While the first slug for Foo may be foo, subsequent copies of ...
0
votes
2answers
819 views

Remove international characters from slug - Almost done - Bit help

I want to remove some characters from the slug, like "¿" that we use in spanish for opening a question. If I go to wp-includes/formatting.php and in function sanitize_title_with_dashes($title) ...
8
votes
1answer
4k views

Is sanitize_title enough to generate post slugs?

I want to generate slug for some strings without going through WordPress slug generation flow. Therefore, I want to know which functions it calls to get a neat slug. I tried sanitize_title() but it ...
2
votes
1answer
2k views

Remove taxonomy base or term from url

I know there are a lot of posts about this here, but NONE of them have answered my problem. I am working with a custom built theme that has a custom category type (named messagetypes). I have a ...
2
votes
1answer
320 views

Why does WP rename similar “term name”-slugs in separate taxonomies?

I have several custom taxonomies and within two of those ( Company Categories and Photographer Categories ) I have a term that is similar. The Company Category called Boudoir and the Photographer ...
1
vote
1answer
540 views

How can I filter by slug depending on language selection

I'm new to this site but looking at the quality of answers provided here I will be here for a long time :) Ok, first a bit of info: I'm developing a bilingual website (English & Japanese) using ...
1
vote
4answers
551 views

How can I force WordPress to redirect to canonical permalinks?

In WordPress 3.1 a post can be reached a number of ways, for example each one of these takes you to the same post (where /id is the base) http://myblog.com/id/1008 http://myblog.com/id/1008/my-slug ...
1
vote
2answers
295 views

Category slug $_SERVER['REQUEST_URI'];

I'm not sure whats wrong with this line. Have I place this incorrectly? How do I get it to recognize the $yourcat->slug; $cat = get_query_var('cat'); $yourcat = get_category ($cat); $uri = ...
2
votes
1answer
199 views

Adding more pages to author pages

At the moment I have the following code for changing the author_base slug. /** ADD REWRITE RULES **/ function change_author_permalinks() { global $wp_rewrite; $wp_rewrite->author_base = ...
1
vote
1answer
1k views

How can I automatically set a post slug based on the post title during post publish?

When you create a post in WP, if you don't specify a title rapidly, WP generates a default slug on autosave, based on the post ID. Then, when you add the title later, unless you modify the slug by ...
0
votes
2answers
779 views

Modify Wordpress to not replace + (plus) characters from URLs?

This is happening in more than one section of our website, but in different yet similar ways. Scenario One: We have a URL structure like this... mydomain.com/some-category/?subject=Some+Subject ...
0
votes
1answer
574 views

How to create posts or pages with the names in wordpress?

When you develop a site on wordpress you may want to create posts/pages with the same name, something that wordpress does not allow by default. Use cases: example.com/en/contact ...
1
vote
2answers
1k views

How do I fix permalinks for custom post types that has the same slug as a page?

I know that it's impossible to have the same custom post type slug as a page. So, I thought it might be resolved in this way: 'rewrite' => array('slug' => 'my-category/!#') for ...
4
votes
2answers
2k views

Change Author Base Slug for different Roles

is it possible to change the author base slug in dependency of the role? For example, authors get example.com/ninja/%username% and subscribers get example.com/trainee/%username% ? I am thinking of ...
4
votes
1answer
9k views

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?
0
votes
1answer
916 views

Custom Post Type pagination when CPT 'rewrite' rule and a page have the same slug

I would like to achive the following link structure on my site: /properties/ -> a properties page with properties CPT, page 1. /properties/page/2 -> a properties page with properties CPT, page 2. ...
0
votes
1answer
312 views

Category Slugs = 404s?

With the help of the internet and you lot, I have been stumbling about to create a worpress site here. So at this stage, its not exactly a default install. - Im running the boldy theme from Site5. - ...
3
votes
2answers
9k views

Get post by page name or slug

I know this is very avant-garde, but bear with me. I've read that one is able to query a page by the page/post name or slug. I'm trying to do this because I need information from a page with a similar ...
0
votes
1answer
834 views

get_term_by with a variable

I have a Custom template with a custom query. I want to use additional information about the current taxonomy > description and name (and use it in the HEAD, desc, keywords, etc...) <?php ...
2
votes
4answers
1k views

WordPress 3.1 removing 'category' from the slug

Is there a way to remove 'category' from the slug when viewing posts in a particular category in WordPress 3.1 without it breaking? My client is asking me to remove it, but it seems necessary - I get ...
3
votes
1answer
492 views

Stop Wordpress Redirection From /keyword to /some-post-containing-keyword/

I have tried everything I've found. I can't stop webhostingbreak.com/ipage/ from redirecting to webhostingbreak.com/hosting-directory/ipage-hosting/ I tried remove_filter('template_redirect', ...
1
vote
1answer
1k views

Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url

I have been reading dozens of posts and honestly, I have many doubts on how this work. Furthermore, I think that with WP3.1 more issues have been added here because I am having even more problems now ...
1
vote
1answer
190 views

Editing URL character replacement

Whereabouts can I edit which characters in permalinks are replaced? For example apostrophe's are replaced with nothing, and I would like to have them replaced with hyphens instead. Thanks.
1
vote
1answer
293 views

Wordpress slugs and 404 handling takes preference over folders in site root?

I have wordpress installed and permalink structure set to /%postname%/ In addition to WordPress folders, I also have a public_html/beta folder where I wanted to copy the same site and test some ...
3
votes
3answers
4k views

How do I get a post (page or CPT) ID from a title or slug?

I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task. I need to get the ID of any given post/ ...
2
votes
3answers
966 views

Add parent template name to body class filter when visiting subpage or single post

how would I go about creating a filter for the body_class() tag that allows me to add the the parent pages slug name as a class to the body whenever visiting a subpage or post?
-1
votes
1answer
378 views

WordPress v3.1 Has Character Encoding Issue With Title/Permalink?

I was on the latest v3.0.x series and had no issues. Once I upgraded to WP v3.1, I am having a strange issue with character encoding in permalinks. If my title was "I have $50 today" in WP 3.0.x, the ...
6
votes
2answers
2k views

How to prevent apostrophes and quotes from appearing in permalinks?

I'm using custom permalinks "/%category%/%postname%/". Whenever a post title contains quotes or apostrophes they appear in the URL. Can someone tell me how prevent them from appearing in the slug? ...
0
votes
1answer
994 views

Getting Post ID from slug during init

I am trying to add a url rewrite rule that finds any posts that are connected to the current post (using Posts 2 Posts by scribu). It's tied into the WP Query object, so all I have to do is pass ...
0
votes
1answer
983 views

Listing all slugs?

I have a number of slugs and items in my custom category: SLUG - number video - 5 items music - 5 items [no-slug] - 5 items empty - 0 items blabla - 0 items I want to list all non-empty slugs ...
0
votes
2answers
1k views

Remove permalink for custom post type

I have multiple custom post types and custom taxonomies, "staff", "games", which have the permalinks: domain.com/staff/%staff-name% domain.com/games/%game-name% However, I'm only using these custom ...
0
votes
1answer
2k views

Interesting Custom Post Type Slug with Taxonomy and Custom Field

I have created a custom post type called "events" and have also created a custom taxonomy which only shows up on this specific post type through which the admin must select an "event category" ...
0
votes
3answers
2k views

Get wordpress taxonomy slug name(s) to use as div class

I'm trying to mark up my posts using their custom taxonomy slug as the div class so that they can be filtered... So far what I have displays the taxonomy name but what I need is the slug so I have a ...
2
votes
5answers
5k views

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 ...
2
votes
1answer
1k views

Create terms when registering taxonomy?

I'm registering taxonomy in my functions.php file: register_taxonomy("our_gallery_types", array("gallery"), array("hierarchical" => true, "label" => "Categories", "singular_label" => ...
1
vote
3answers
2k views

How to create non-unique sub-category slugs?

What’s the best way to make Wordpress accept non-unique sub-category slugs? By default, Wordpress ensures that every ‘slug’ portion of permalink URLs is unique, and is very savvy about using this to ...
5
votes
1answer
4k views

Rename files during upload using variables

I'd like to rename files during upload and set their names to the post slug the files are being attached to, plus some random characters (a simple incremental counter will de just fine) to make the ...
0
votes
1answer
437 views

Removing Automatic Redirects Without Plugin

I've been working on a wordpress site and run into the automatic redirect feature when you change a slug. On the current site I am using the Redirects plugin, and was able to modify the redirects so ...
7
votes
1answer
3k views

custom taxonomy and pages rewrite slug conflict gives 404

I'm using the Custom Post Type UI plugin to create my custom taxonomies. I have a portfolio that is made up of projects (custom post type) with 2 custom taxonomies of technologies and clients. The ...
1
vote
1answer
585 views

Slug is redirecting to 404

I had a page called Recipes. I changed it to Recipes_old and changed the slug so I could create a new Recipes page. When I created the new Recipes page the slug was properly defined as /recipes/ but ...
2
votes
2answers
2k views

Removing the number in a category slug

I have a category that ends with -2, and there's no way I can change it back to the plain word. I know there are problems with numeric slugs, but this is just a word. I also know that a common answer ...
4
votes
3answers
2k views

Removing Metabox for “Slug” without removing functionality

Here is an interesting question. I have recently noticed that if you utilize the code remove_meta_box('slugdiv', 'post', 'normal'); you are actually unable to modify the slug when you click on ...