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

3
votes
1answer
916 views

Is It A Good Idea To Change Author Slug (user_nicename field) Directly In MySQL DB?

Searching for a how-to on changing author slug, I found two methods: Change the user_nicename field in the MySQL database of your WordPress site to whatever you want the slug to be. Changing the ...
0
votes
1answer
150 views

retrieve post slug by post_tags taxonomy

My scenario: I have a part of a site which retrieves all post_tags terms for a specific category the code: query_posts('category_name='. $category[0]->cat_name); ...
4
votes
2answers
5k views

Wordpress slug issue with non-latin characters

I'm using permalinks in WP as: domain.com/category/post_name The issue is that post names have non-latin characters such as chinese, hebrew, and arabic. So it encodes them to something like: ...
0
votes
1answer
180 views

Need equivalent of single_term_slug

I am building a taxonomy archive page and I am trying to create a linked instance of the current term outside the loop. So, let's say my taxonomy and current term are: Taxonomy: Animals Term: ...
0
votes
3answers
2k views

How do you create %post_type%/%postname%/ permalink structure?

How do you create %post_type%/%postname%/ permalink structure? This is what is not working: eg. ( domain.com/blog/ ) -> "click on post" -> ( domain.com/post-name ) How do I make "blog post" ...
0
votes
1answer
369 views

Query specific posts from parent by slug rather ID

I'm developing a theme in a local machine and migrating it to a production server. To keep things in sync, i'm trying to avoid any queries of specific ID's On the homepage, i'm trying to query the ...
1
vote
1answer
2k views

remove custom taxonomy base / slug [duplicate]

Possible Duplicate: Remove slug in taxonomy url I'm using proreview theme and it uses a custom taxonomy called "review-cats" In of this www.domain.com/review-cats/clothing I want ...
0
votes
2answers
3k views

Using a portfolio_category slug in wordpress URL

I won't lie - I don't know php but I enjoy digging around trying to find ways to customize themes so that they behave how I want them to. Any help would be very much appreciated. What I am trying to ...
2
votes
3answers
937 views

How to prevent duplicate slugs for wp_insert_post?

I have a function that creates a page when I create a post (so as to construct parent-child relationship trees). I'm using the $title of the post to create the page and this also creates a duplicate ...
1
vote
1answer
760 views

Make wp_list_pages print slugs instead of titles

By default wp_list_pages spits out an unordered list of post titles. To save space in a sidebar menu I´m trying to create a list of page slugs instead of page titles. I suppose I´ll need to write a ...
0
votes
1answer
358 views

wp_insert_post generated mixed permalinks

I'm writing a plugin which uses wp_insert_post() to insert posts programatically and my permalink setting is /%category%/%postname%/ Of all the post inserted, wp_posts.guid shows 2 types of output. ...
2
votes
2answers
753 views

How to get full slug, including all parent pages

I am trying for hours and I managed to get full slug for parent of sub-page when I am on 3rd level sub-page I can not get slug of the top parent page. Example domain.com/top_page/sub_page/sub_sub_page ...
1
vote
1answer
489 views

Non latin post slug truncate

I created a custom post type and set its permalink structure to 'category/postname'. I found that sometimes, when i create a post in a non latin characters, the post slug is getting cut. I googled ...
3
votes
3answers
861 views

How to control which category will be picked for the slug of a post?

I'm using the permalink structure "/%category%/%postname%/". What bothers me is that I have posts that belong to two categories. And of course, unfortunately, Wordpress always picks the wrong one for ...
1
vote
1answer
211 views

How to create a custom CSS class for a specific page template?

I created a page in called "mypage". Then I created a custom template page called "page_mypage.php". Now, I just wanted to create some custom CSS classes in style.css. I tried with: ...
5
votes
3answers
1k views

Regenerate Slugs From Title of Posts

is it possible to regenerate the slugs programmatically after changing the titles of the post? Numerous post titles were updated and the slug was not updated with the title so I need to regenerate all ...
1
vote
3answers
478 views

Easiest way to simulate WordPress's URL resolution to retrieve post ID, etc?

I'm curious if it is possible, in a plugin/custom code, to take an URL that has been generated by the currently running WordPress site & parse it to retrieve the $blog_id and $post_id? ie. taking ...
1
vote
2answers
1k views

Custom Permalink with Dynamic Taxonomy for Custom Post Type - Works, but breaks other permalinks

My custom permalink with dynamic taxonomy is working for my custom post type. However, it breaks all my other permalinks. They display a 404 error in the content area (header and sidebar still ...
0
votes
1answer
739 views

I use same slug name for category and page

I added one slug and page with the same name and they worked fine, but when creating a second WP forced me to rename the page (being created after the category) with an additional "-2" how to clear ...
1
vote
2answers
4k views

When I change slug, will WordPress create redirect from the old URL?

When I change a slug from post-a to post-b, will WordPress create a redirect from /post-a to /post-b, like HTTP 301 or something similar? If not, is there a plugin for that?
1
vote
2answers
1k views

Automaticly add slug to posts

I'm using a us/news/%postname%/ structure for my permalinks. This works great for regular posts. However, I have a few different custom post types, and I don't want the us/news part in their slug. ...
2
votes
1answer
360 views

Set default (auto) slug prefix for Tags

Is it possible to add default prefix to the slug of each newly added Tag. So that full slug, would be stored in database (no rewrites). For example: Name: Tag1 -> Slug: prefix-tag1 Name: Tag2 -> ...
4
votes
3answers
29k views

How to retrieve the slug of current page?

I am trying to retrieve the slug of the current wordpress page outside the loop. The title of the page returns with wp_title () but how can I get the slug? <li><a ...
8
votes
1answer
5k views

Redeclare/Change Slug of a Plugin's Custom Post Type

Is it possible to redeclare/change the slug of a plugin's existing custom post type (without simply editing the plugin)? That is, if Plugin X creates a custom post type with the slug /uncookedtoast/, ...
1
vote
2answers
75 views

Define a name to the posts slug

I would like to use the url http://site.com/post/title-of-the-post for my posts and I've saw in my admin page I have the current url http://site.com/%slug%/title-of-the-post obiouvsly incorrect. How ...
5
votes
3answers
399 views

Prevent Wordpress from abbreviating-long-slugs…-in-the-admin

On post edit pages, when a slug exceeds a certain number of characters, Wordpress abridges it with an ellipsis (...). For example, if my slug is i-want-to-be-able-to-see-this-slug, it appears on the ...
0
votes
1answer
4k views

custom htaccess rewrite rule for page

i have a page in wordpress called "video". its page id is 6, and its slug is "video" in my theme ive set it up to show content based on GET variables here is the URL rewrite im trying to set up: ...
0
votes
1answer
190 views

Is this the correct way to add post-slug input field?

I added slug input field in my custom post type and allow users to edit it at front end. Then, when insert post, I use this: $wp_insert_post_args = array( 'post_status' => 'publish', ...
1
vote
1answer
314 views

filtering special chars from post slug

Is there a way to prevent WordPress from including special characters like – (long dash), ", ', etc.. from the post slugs? Basically, I'd like to run the post-slug through a filter when it is ...
1
vote
0answers
124 views

How to avoid directory name collisions with root Wordpress install [closed]

I need to know how I can keep the end-user of a wordpress site installed in the root directory from creating slugs that will interfere with sub-directories that are already present. I've Googled ...
-1
votes
2answers
405 views

author slug in the backend

hi and thanks for reading i try to grab the authors slug in the backend. get_the_author_meta( 'user_nicename' ); is empty. i tried to google this issue, but cant find any concrete info on how to ...
5
votes
1answer
3k views

custom slug for custom post type

Hi and thanks for reading. I want to insert the post author into my custom post type slug. Example: http://example.com/charts/%author%/ Any ideas how to accomplish this? Here is my custom post ...
3
votes
2answers
1k views

Must slugs be unique?

Is it true that slugs must always be unique, regardless of the rest of the url, or if it's used by different post-types or taxonomies? For example, is it possible to have both of these urls? ...
1
vote
2answers
3k views

Get list of all registered post types slugs

I'd like to get a list (array) of all the post types I registered. Precisely I would like to retrieve their slugs. Could someone help me? thanks!
0
votes
1answer
67 views

One Page or Post, n Slugs

What would be the best option for serving up a page for any one of many slugs. Suppose I have the following: example.com/the-broken-slug example.com/thebrokenslug example.com/broken-slug ...
0
votes
1answer
306 views

Can’t use a specific custom URL (slug)?

I’m having some problems understanding an error I’m getting. I have a page which is called “pitch” and as such the URL and the slug should be “pitch” as well, so: www.my-domain.com/pitch/ But when I ...
0
votes
1answer
172 views

BuddyPress Component Slug 404 [closed]

I have created a custom component using the latest skeleton framework that needs to have its URLs as part of the current group. I have accomplished this is in my component's setup_nav() function, but ...
0
votes
3answers
3k views

Using same slug name for a page and category

I know it isn't good practice but I'm considering using same name slugs for some pages and categories on a site that I'm working on. It's a small site and it doesn't seem to affect anything in ...
10
votes
3answers
4k views

Custom Post Type Slug / Page Slug Conflict - Prevent use of reserved slug on page save?

I have a custom post type of portfolio (slug portfolio) in my theme and all is working well except one thing. When people create a page with a slug of portfolio, eg: example.com/portfolio, the theme ...
5
votes
4answers
5k views

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 ...
0
votes
1answer
493 views

How can I edit the slugs of tags?

I'm interested in specifying different URL slugs for tags than the text they contain (e.g. changing the slug for a "QnA" tag to "questions-and-answers"). What's the easiest way of making and ...
1
vote
1answer
287 views

How to edit/remove a term that's in multiple taxonomies?

Some of the terms on my site appear with the same exact slug, in multiple taxonomies. For example: 'education' appears in both the 'department' taxonomy and the 'topic' taxonomy. Now, I can't seem ...
1
vote
1answer
76 views

Displaying a full post instead of a slug per category?

I have a single category on my blog that I want to display full posts in when looking at the category instead of just slugs. The category is for Podcasts, and presently it displays slugs which: ...
0
votes
2answers
276 views

Select query with two and two related taxonomies

is this possible for 2 taxonomy and 2 terms $querystr = " SELECT * FROM $wpdb->posts LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id) ...
0
votes
1answer
3k views

Show all posts in category

I am trying to show all posts in each category. I've been searching around and it seems I need to have either the category slug or term_id to do so, like the code below. <?php ...
0
votes
1answer
2k views

Add category to custom post type automatically, using category slug

I'm using this excellent function to automatically add a category to my custom post type "Videos" on publish, if there's no category already chosen. This works great: function ...
0
votes
2answers
3k 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
403 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
3answers
2k 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
367 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. ...