Tagged Questions
0
votes
1answer
48 views
Use the category name instead of category slug in permalinks
How to create a permalink structure which finish by:
/category-name/post-name/
Instead of:
/category-slug/post-name/
By default, Wordpress is offering %category% tag strucure as "A sanitized ...
4
votes
1answer
42 views
How to i18n slugs for templates?
some templates are chosen from WordPress based on slugs (e.g. category-{slug}.php).
Problem:
How can I use the same template for an i18n'ed slug?
Example:
I have a category-news.php and an english ...
4
votes
1answer
50 views
When creating a WordPress page, a “-2” suffix is added to new pages' permalinks
I have noticed after deleting an original page in WordPress with lets say a permalink of your_domain.com/contact/ and then trying to recreate the same page with the same name/slug, my WP is generating ...
0
votes
1answer
46 views
disable permalink on custom post type
I have created a custom post type, but I do not want it to have a permalink. By default, after entering post title, it creates a perma link. I do not them to be generated.
From my reading, it is said ...
0
votes
1answer
89 views
Don't change Custom Post Type slug to unique value
I have a situation where it is needed that if I create two CPT pages wich both have the same name and the same slug.
For example, if I add two CPT pages, wich both called "Post Name":
The first slug ...
1
vote
0answers
103 views
Custom Post Type - Duplicate Page Slugs
I have 2 custom post type registered in my functions file, sectors and projects. There are pages with the same name and hence URL in both post type. My problem is that WordPress wont allow the same ...
2
votes
2answers
164 views
how to automatically generate random slug
I have tried to create a function that generate a random slug when a post is created. I am a bit worried that the function generates non unique strings as slugs. How can I solve this?
The function ...
0
votes
1answer
70 views
Page content doesn't display when published but does when previewed as draft?
I have a page called ecommerce which is published. It's not private or password protected. When I view the page I only see the page title in the body none of the content. If I preview the published ...
1
vote
1answer
271 views
How to achieve this permalink -> category-name/custom-post-type-name/post-name
I am trying to use categories to provide the structure for my site. I will create sections on my site called England, Wales, Scotland and Ireland . These will be categories. My posts will use custom ...
1
vote
1answer
295 views
Change slug with custom field
I want to change the slug of a post with a custom field.
In example, if the custom field is "keyword" my post link will become: mysite.com/keyword.
If the custom field is empty, i want to generate a ...
1
vote
0answers
55 views
Slugs Disappeared Leaving 404s - Quick way to repopulate?
I've got roughly 3000 pages in WordPress w/ permalinks on. I recently cleaned up the database which appears to have deleted a fair amount of slugs for many of the pages.
Obviously, with no slug, ...
4
votes
1answer
166 views
Dynamic taxonomy in permalink made all other posts NOT FOUND?
I added my taxonomies in the permalink instead of the Custom Post Type's slug, and it works fine. I'd even say everything was working fine but changing the WP installation to Multisite broke all other ...
2
votes
1answer
510 views
Remove parent slug for child pages
I'm looking for a plugin/custom function that removes the parent slug of a child's page permalink.
Something that automatically changes the permalink for child pages.
Example:
...
0
votes
2answers
498 views
How to Custom Edit Post Title & Permalink Slug?
I'm trying to build some functionality where if you're logged into an admin account you'll see a small 'edit' link next to each post title. clicking will use jquery to create 2 form inputs - 1 with ...
5
votes
4answers
121 views
Post type child of another post type
This may be a stupid question but is it possible to have a post type child of another post type?
Let me explain with an example:
I created 2 post types, "Actors" and "Galleries".
What i want is to ...
3
votes
1answer
199 views
Limiting the number of words or characters in the slug/permalink
Limiting the number of words or characters in Wordpress slug/permalink. I would like to limit the number to the first 5 words (or 20 characters) even if the post title is longer.
example:
Title: ...
2
votes
1answer
377 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 ...
5
votes
2answers
2k 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
91 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
627 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
216 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. ...
1
vote
1answer
287 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
356 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 ...
0
votes
2answers
600 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
2answers
342 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.
...
0
votes
1answer
344 views
I get 404 after slug change - what can be done? [closed]
I just changed the slugs for 4 pages on my site, and since then I get a 404 when trying to visit them. When I switch to normal/ugly permalink structure it's fine, and when I switch back the problem ...
5
votes
3answers
204 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 ...
1
vote
1answer
226 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
2answers
365 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
311 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 ...
0
votes
2answers
603 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)
...
1
vote
4answers
318 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
...
0
votes
1answer
489 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
682 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 ...
1
vote
1answer
162 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
272 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 ...
5
votes
2answers
1k 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
2answers
931 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 ...