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
13 views

Creating plugin for changing slug

I need help about creating plugin for rewriting slug. When you enter you post name or page name wordpress is creating slug. So I want to make some modification. I don't know how to make changes in DB ...
0
votes
0answers
28 views

Remove CPT slug in multisite installation

I would like to remove the custom post type slug from the site url. Searched hours for a solution. Didn't find a working one and can't resolve it on my own. It is a domain-based multisite ...
0
votes
0answers
11 views

How to occupy Wordpress slug [duplicate]

I'm wondering how to occupy a certain slug to prevent it from being used by my users. I want to make a custom redirect to redirect the users to my login page. So the url could be ...
0
votes
1answer
22 views

Force/Limit the post/page slug to accept only url friendly characters

Is there a way to overwrite WP slug validation function to only accept basic characters ([A-Z0-9-]) as I want to avoid the long encoded permlink. Thanks.
0
votes
1answer
19 views

How to add an attribute data-slug = “$specfic_page_slug” in WordPress menu item?

I want to add custom attribute in WordPress menu item which has specific page slug. like this - <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-101" ...
0
votes
1answer
21 views

Change user slug in Buddypress

I am creating a site with Buddypress. Everything is going good so far but default member slug for buddypress is domain.com/members/abc. I want that it as domain.com/abc like facebook and twitter. Any ...
4
votes
1answer
40 views

Replace Wordpress %postname% suffix with %postid%?

I run a news site and there's a Wordpress permalink issue that I have been wondering. Now, Wordpress will add an incremental numeric suffix to duplicate %postname% regardless of the directory ...
0
votes
1answer
21 views

Getting a 404 on single custom post type page when using rewrite on a custom taxonomy

I am getting a 404 on my single custom post types whilst using the 'rewrite' option in the custom taxonomy. If I take the rewrite out the single page works but the custom taxonomy archive then 404's ...
0
votes
1answer
27 views

Custom Post Type for Shortcode Use - Prevent it display as a post (with slug)

I've developed a series of plugins which can display categorised custom post types via shortcodes, along the lines of: [myshortcode myshortcodegroup="groupname"] This works just fine, however, I ...
0
votes
0answers
23 views

Custom post template for custom post type

I created a custom type post: add_action('init', 'crea_prodotti'); function crea_prodotti() { $labels = array( 'name' => __('Prodotti'), 'singular_name' ...
0
votes
1answer
41 views

How to auto update post title and slug with category name when post status is updated

I need to auto update post title and slug with category name every time when post status is updated. Some function like this but with the correct code.... ...
0
votes
1answer
25 views

Wordpress CPT slug and page slug conflicts

I have one page slug "new-site" also i have another custom post type with same slug "new-site" while i browse site http://example.com/new-site then it directally goes to archive page and show all the ...
0
votes
2answers
58 views

Auto update post title and slug when post status is changed

I need help. Thanks in advance. I need a function that update post title and slug with some default title + current date when post status is updated from draft to published. I use this one to update ...
1
vote
1answer
40 views

How do I get the category URL from get_the_category?

My loop below shows the latest 4 posts from the same category as the post currently being viewed. Its located within single.php. I'm trying to get the URL of that same category so I can link back to ...
0
votes
0answers
16 views

Wordpress Site Architecture Question

I have a multi site called 'quotes' the url of which looks like example.com/quotes/. I have some quotes under them like example.com/quotes/this-is-a-quote.html. I have some authors like ...
1
vote
1answer
42 views

pass user id in slug and get user information

I have user id and I am getting all information using user id on page with slug. When I pass the user id in slug then I am not getting user information on page. For example I have ...
0
votes
0answers
32 views

After I changed the slug of a custom post type, the single page returns 404

I created a custom post type using types plugin the post type has ad as slug, but now need to change it to card, and I edited the slug field in the types panel. the thing is that new urls return ...
1
vote
1answer
64 views

How to generate slugs?

I have the following situation. I accidentally updated post_name column in wp_posts tables for all rows. Now I need to update those back somehow. I have researched that WP uses this function to ...
0
votes
1answer
112 views

Woocommerce get the Archive/Category slug of the current category page

I want to get the slug of the current archive page. I have a slider where I want to echo the products that are in this category. After hours this is all I have and it doesn't work... <?php if ( ...
1
vote
1answer
57 views

How to make draft posts or posts in review accessible via full url / slug?

I am running a website with WordPress 4.2 and have changed the way draft posts or posts in review status are displayed to non logged in users (these posts are, too, visible to anyone who visits the ...
0
votes
0answers
31 views

Can I override the permalink/slug on creation

I have a plugin that imports data from an external API, creates a 'Product' Custom Post type ( or updates an existing one ) and then adds all the meta data. Every time we update the product from the ...
1
vote
0answers
29 views

Editors change a permalink on an unpublished post, but only admins change a permalink on a post that has ever been published?

Is it possible to have the Editors to change a permalink on an unpublished post, but only admins change a permalink on a post that has ever been published? I can hide the button for non admin but I ...
0
votes
1answer
25 views

How to create URL for Pages/Posts

I am not able to create a URL in WordPress like: www.example.com/lp/time-cost/free-trial When I add this URL, it's automatically changes to: wwww.example.com/lptime-costfree-trial Why are the ...
2
votes
2answers
213 views

Change slug on post creation

I currently use Post name for the permalink structure. I want to add text from a field at the end of the permalink. Is there any hook for the permalink creation when a Post is published? In my case, ...
0
votes
0answers
37 views

How to add id to custom post type taxonomy term slug?

For example, if custom post type taxonomy is "cpt-category" and term is "cpt-term-11", I would like to show and link like this(*123 is term id) /cpt-category/123/ instead of ...
0
votes
0answers
29 views

URL rewrites with two post types

I have two post types: car and parts. Now I would like to be able to rewrite the url slug for parts bit differently. Right now it is like this: mydomain.com/parts/some-part-post-slug And for cars it ...
1
vote
0answers
16 views

Removed custom post type slug but not working for child pages

There are many discussions going about to handle child pages for custom post types were the custom post type slug has been removed. This results into an 404 because Wordpress can't match a valid ...
0
votes
1answer
32 views

What function removes apostrophes when making a slug?

I am trying to convert a post title to a slug. I used sanitize_title_with_dashes, thinking that's what WordPress uses. However, if my post title has an apostrophe in it, sanitize_title_with_dashes ...
0
votes
1answer
31 views

post_name is not stored until post is published… where should I store my slug until it goes live then?

important try as normal contributor user, not as admin see here I actually have it reproduced. Seems like a bug to me but whatever. I want users to choose their slug. Well, as you cannot store ...
0
votes
1answer
32 views

Hide category name using mod_rewrite

I have a website with at least 3 categories. I have set one of them as the default category. Next step was that I need to have the category slug of the default category to be hidden from the URL ...
0
votes
0answers
23 views

Two taxonomy terms with the same slug

I have 2 custom taxonomy: Phones and Tablets. I want both of them as with rewrite slug price. It is ok. But When I add the terms with the same name to them it cause an error in archive page. For ...
0
votes
3answers
36 views

Wrong slug on blog page

<?php global $post; $post_slug=$post->post_name; ?> This code is used after <head> and before <body> and is supposed to get current page's slug. It works great, however ...
0
votes
0answers
74 views

Is 'pm' used by core?

We've a private messaging system that uses the page slug pm. It lists messages. Recently, we noticed that pagination stopped working on this page. So going to page 2 gives a page not found error. ...
1
vote
1answer
46 views

How can I make sure attachment pages require a base url?

If I upload an image with the filename 8.jpg then the permalink becomes http://www.example.com/8 -- which I really don't want. How can I make attachments use their mime type as a base for the url? ...
6
votes
1answer
125 views

What is wp_insert_term “alias_of” arg for?

I currently put my hands into WP taxonomy and terms to find solutions for my project. I knew that it's not possible to have same terms slug when creating a term with wp_insert_term in one Custom ...
0
votes
0answers
64 views

WP-API custom post types request by slug

How to get post by slug in wp-api for custom types, I've been extending the api and I can fetch all posts of my custom type but I would like to get the items by slug. I see in documentation that I ...
0
votes
0answers
11 views

How can I add slug/category to portfolio permalink? [duplicate]

My portfolio URL currently looks like this: sitename.com/portfolio/ I would like to add the category slug after so it reads: sitename.com/portfolio/slug/ so that if I go to a portfolio item of a ...
1
vote
2answers
36 views

Replace taxonomy permalinks

I have this permalinks settings: /%postname%/ I have a custom taxonomy issue. I want replace all my taxonomy links (site.com/category/wordpress) to (site.com/category/wordpress/issue/any-child). ...
0
votes
0answers
10 views

Use Post's subcategory in title tag

I changed my title to: %%subcategory%% %%sep%% %%title%% But WordPress doesn't seem to recognize %%subcategory%%, in the end it simply displays - My title How should I change the title to ...
0
votes
0answers
42 views

Rewrite Rules: Post ID within Post Slug for a Custom Post Type

I've got my custom post type slug article and I need the following permalink structure: http://domain.com/article/postname-123/ The number in the end has to be the post ID. I don't want ...
2
votes
0answers
60 views

Change the author slug from nickname to ID

I've changed the default registering option by allowing people to sign up with their e-mail addresses. They also have an option to add their firstname, lastname but it's not required. // Allow email ...
1
vote
1answer
24 views

Set taxonomy slug as taxonomy title

With post types I can easily set the slug to be always identical to the post type title. add_filter( 'wp_insert_post_data', 'prefix_wp_insert_post_data' ); function prefix_wp_insert_post_data( $data ...
0
votes
0answers
26 views

Does WordPress Have Built In Filtering By URL?

About a week or two ago I was reading this article that said that WP now has built in functionality to filter what an archive page displays based on url slugs. For example, without adding any code ...
1
vote
0answers
28 views

Including taxonomy term before post type breaks top level pages

Got a website that has two top level pages called commercial and domestic, and in these pages there is other content that shares a similar format, e.g. I want case studies in both the commercial and ...
0
votes
0answers
33 views

Non unique Slugs and permalinks

I am migrating a clients site from an old code ignitor app to WordPress, with one of the biggest project briefs being "keep original data intact and make WordPress work around it" ... For almost ...
2
votes
1answer
103 views

Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?

I have a custom post type called ‘sets’ and a taxonomy set up under it called ‘project’. Most of the posts under this custom post type will be assigned one project term, but not necessarily. When a ...
0
votes
3answers
113 views

How do I get slug of term by his name?

The WC_Order_Item_Meta::get_formatted() function returns terms array of the order. Each term is an array of three things: 'key' => $meta->key // attribute key 'label' => ...
0
votes
0answers
48 views

Unicode permalink slug are getting tuncated

I'm developing a website which is mainly a Bengali language based website. I'm using the post-name permalink structure. Every time a post name get longer, slug is getting truncated. Is there any way ...
0
votes
1answer
260 views

WooCommerce duplicate sub categories and product slugs

I'm building a website that allows you to hire or buy a product. I've set up the following product categories in WooCommerce: Hire Buy Is it possible to have the same sub-category slug under each ...
2
votes
2answers
247 views

How to get Plugin Slugs?

I am trying to get the 'slug' used for each plugin installed. I have not found a good solution for this. I have created this function to get all the slugs and return them in an array. I am hoping ...