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

Get menu item slug

I use custom menus and I’d like to get the menu item slugs. Is that possible? // Get the nav menu based on $menu_name (same as 'theme_location' or 'menu' arg to wp_nav_menu) // This code based on ...
0
votes
1answer
15 views

Site transferred to new server produces 404s

I have transferred my site to a new server. I can login to wp-admin ok and can view the home page but all other pages produce 404s. I have changed the 'Home' and 'Site URL' options in the settings ...
0
votes
1answer
33 views

Can't make permalink of CPT work

i'm learning how to use wordpress, but i've encountered a big problem. I'm trying to create a custom post type, i've used this code: add_action('init', 'init_realizzazioni'); function ...
1
vote
3answers
399 views

Wordpress 3.8.1 Multisite blog slug problem

Just installed Wordpress 3.8.1 multisite but can't remove the /blog/ slug. I've tried all suggestions for older versions of Wordpress (including the solutions to the question posted on this site 6 ...
0
votes
1answer
722 views

List child pages by slug not ID?

I am looking to use the wp_list_pages function to show children pages of a specific page ID. I was able to do this easily, but now I found an issue with it. I am running a Wordpress network of sites ...
0
votes
0answers
24 views

Possible to hide parts of the slug from get_template_directory_uri and bloginfo('template_directory')

At the moment i am running and building a wp site on a local install with mamp. Additionally i have moved the wp files from the root directory to a folder. i've included files then e.g. with ...
-2
votes
2answers
32 views

can't change page slug

I created a page (with slug "page-title" say), then deleted it. I created a 2nd page with the same title, and it automatically saved itself with a page slug of "page-title-2". The first page no ...
1
vote
1answer
507 views

Pagination for category slug returns 404 when page >= 2

I have a custom type and the slug is: 'rewrite' => array('slug' => 'blog/%blogs_tax%'), And after register_post_type() I have a function to rewrite the slug variable. I works fine, but I ...
1
vote
0answers
21 views

Pre-populate Slug / Permalink with URL

I would like to not only pre-populate the title, tags, and categories, but would also like to pre-populate the slug / permalink as well. Can I do this and if so how? Here's my functions.php code: ...
-1
votes
1answer
27 views

is this a bug or not?

When we make a custom post type (in my case 'news'(slug is news also)) and a page is with name 'News' (with slug 'news'). Then when I add some pages with parent 'news', it's displaying 404 in ...
3
votes
1answer
196 views

Editing the Number at the end of Page URLs / Editing Page Slugs

I am playing around with wordpress and a few plugins. Say I have something called "Shopping Cart" and I delete the page. Then I recreate it, I can't have the old URL back. I get ...
0
votes
0answers
53 views

How to make nested custom post type slugs work

I'll try to explain how I want this to work, rather than what I've done so far, as nothing seems to work. I want 3 custom post types: Products Consumables Accessories with the following slugs: ...
0
votes
0answers
21 views

make a post or page permalink based category

I have two language categories on my site, English and Indonesian. How can I create permalink post or page based on category slug such: example.com/en/page example.com/id/page or ...
2
votes
2answers
1k 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
558 views

Rename “Portfolio” slug?

I have a WordPress theme that I am working with called "Forte". Yes, it is a premium theme. I have reached out to the developer but apparently he doesn't really want to help in this situation. Well I ...
0
votes
1answer
11 views

Need to return a string as permalink insted of str_replace

I'm using this code to get a alphabetic list of CPT's at my site. It's great and works perfect. One problem, the snippet returns urls as a string, tha just converts the_title to a slug, and that does ...
0
votes
1answer
49 views

Define a post's title and slug from Custom Fields

This question is relate to another one on WPSE: Set post title from two meta fields I am looking for a way to define a WP custom post type's title and slug from a custom field (i.e. first name and ...
1
vote
1answer
623 views

Why id in urls doesn't work and slug yes?

I'm lost, I don't understand why this works http://website.com/?tag=my-cat-slug and not this http://website.com/?tag=15 It's really annoying because wp_dropdown_categories() only provides ids as ...
0
votes
2answers
35 views

Show all wp_get_post_terms slugs

I am using the following code to display my custom taxonomy slugs. However it is only displaying the first category and not all the related categories. I know this is fairly simple and is to do with ...
0
votes
1answer
44 views

Sanitize slug title

i need to convert this strings into the post url: (numbers with the point and € symbol) ex: 9.000€ -> 9000-euro I found this function but is not working: add_filter( 'sanitize_title', ...
0
votes
0answers
33 views

Is it possible to rename an url from custom post type?

On my test site: http://outletdokkum.nl/kollum/dagaanbiedingen/y-bike-2/ You see a week offers (weekaanbiedingen in dutch). But as you can see the url says Day offers (Dagaanbiedingen in dutch). ...
0
votes
1answer
116 views

woocommerce - products by category slug?

good morning, I need to display the shop base page in a category layout,meaning first show all the products from category A and beneath it all the products from category B and so on.. I trying to use ...
0
votes
0answers
21 views

Custom field as Slug

I would like to ask if it's possible for a custom field to become a slug. Like if I have a custom field of "when" whose value is "today", I would like the address of the post to be ...
3
votes
1answer
52 views

Reslug a Custom Post Type

I built a plugin for wordpress with custom post types and somewhere along the line I realized that I had to rebuild the way slugs are generated. Originally, I had the cpt making default slugs like ...
2
votes
1answer
753 views

Regenerate slugs from title of posts

is it possible to regenerate the slugs programmatically after changing the titles of the post? The girl that updated the title of more than 200 posts just "forgot" to update the slug too, so i was ...
0
votes
1answer
59 views

Change custom post type slug from plugin options

I'd like to give users the option to change a custom post type slug in my plugin. Using this answer, I'm able to hardcode it into a function: Redeclare/Change Slug of a Plugin's Custom Post Type ...
0
votes
1answer
79 views

Custom post type single page (single-{CPT-name}) 404 when slug includes hyphens

I have a CPT called "author". After an hour searching why I get a 404 visiting single pages of this CPT (managed by template "single-author.php") I realize that some do work: those whose slug doesn't ...
1
vote
0answers
35 views

Plural Category Base Slug On Category Archive Page

I've got a little problem with the category base slugs. Say I have got a category called 'Resources', with the category slug set to 'resource'. So any post in the category resource will appear with ...
0
votes
0answers
25 views

How to remove slug from more than one custom post type

I followed this tutorial from WordPress (http://vip.wordpress.com/documentation/remove-the-slug-from-your-custom-post-type-permalinks/) to remove slug from custom post type. Now my question is how to ...
0
votes
0answers
43 views

how do i add posts-page slug before posts slug in permalinks

I have a posts page and the page slug is /blog my current permalink structure is /%postname%/ when i click on a blog post. say for example the posts slug is adrenaline-rush the url is ...
3
votes
1answer
79 views

Prepend meta_value to permalink of post

I have 2 custom post types movies (non-hierarchical) and series(hierarchical). Each post from seriestype has a meta field _movie which contains a movie ID. I want to specify a custom permalink ...
0
votes
1answer
29 views

How to keep the /blog slug even in single post slug

I have a simple website on wordpress (latest version), assume example.org. I wanna have the user posts at something like example.org/blog/username/posttitle. So I need some levels: 1) ...
0
votes
2answers
67 views

Get ID of child from child slug, while knowing parent ID

I have a hierarchy that I need to get data from. It's the child (by slug name) that I need to get while already having knowledge of the parents. Highest Known Parent Page (slug : 'parent') |_ Child 1 ...
0
votes
1answer
23 views

How to Disable UNICODE slug?

I am inserting the post titles in UNICODE, but i dont want to save in unicode UTF8 characters. Instead, i want to use my title convert function before slug auto-creation: like this: function ...
0
votes
2answers
31 views

Ordering categories by slug vs. name

I am simply trying to reorder my dropdown options in my header menu. It pulls from categories and is currently listed them, with the exception of the first, in alphabetical order. I want to list in ...
0
votes
2answers
77 views

How to update all post at once?

Is there a way to update all post at once? The issue is, when i migrated content from another CMS, some of the permalinks are working fine and some of them are not, when i updated the posts all links ...
5
votes
2answers
3k views

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 ...
0
votes
0answers
24 views

Create or Update Post Slug from Custom Fields

When i create or update a post, i want to create or update the slug (url) of my post from Custom Fields and not the title...! An idea ? Thank you !
0
votes
1answer
84 views

How to get category slug link? ( include parent categories)

for example, if main category slug is cars; sub-category slug is: Ford; how to get the permalink of Ford, including its parent categories' slug? ( get_category_link() returns mysite.com/?cat=19 type ...
1
vote
1answer
106 views

Multiple Permalinks for Same Post

I'd like to be able to have multiple permalinks for the same underlying post (for i18n reasons) - eg http://www.example.com/my-custom-post-type/this-is-a-cool-article ...
4
votes
3answers
761 views

Natural URL Design and static front page

A static front page and other pages which are children of it are used on a blog. To give an example: www.example.com The slug for that page shows up in the permalink for sub pages like ...
0
votes
1answer
79 views

Custom Post Type Rewrite Rule

My theme uses the following code: 'rewrite' => array('slug' => $this->safe_name . '-detail'), which produces this slug: http://www.example.com/estate-detail/4-bedroom-property-for-sale/ ...
0
votes
2answers
81 views

Remove Slug from Custom Post Type

I was wondering how i can remove the prefix from the slugs of custom post types using htaccess rules or any other appropriate method. Currently my custom post types look like this: ...
2
votes
3answers
693 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 ...
0
votes
2answers
42 views

How to controll the Posts post type and general wondering about WP data structure

I want to: Control the name of the Posts post type, like I can with custom post types Set an archive page for posts e.g. example.com/posts, like with custom post types Control the archive slug, like ...
0
votes
1answer
27 views

How can I retrieve the slug for a custom post type via name?

How can I retrieve the slug for a particular custom post type via its name? I would appreciate some assistance.
4
votes
1answer
2k 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 ...
0
votes
0answers
55 views

How can Custom Post Type and a page have the same slug?

I have a page called "Art" that can be viewed at /art. I also have a custom post type called "samples" with a post called "Art" inside of it. It SHOULD be viewed at /samples/art. For some reason, ...
0
votes
2answers
1k views

Convert post name into post ID

I am trying to create a function for my functions.php file that will allow me to convert a post name into a post id. I have had a look around online and managed to find this link ...
0
votes
0answers
76 views

Change search permalink slug to e.g. /tutorials/search/searchterm

I want to rewrite the ugly /?s=searchterm to /tutorials/search/searchterm It's a multisite, so I want to make this multilingual. How can I accomplish this?