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

Rewrite category slug

I have some categories like so: /europe/postname /usa/postname For various reasons I would like to rewrite these to be: /news/view/postname I've tried a few re-direct plugins but not had any ...
0
votes
1answer
24 views

How to print partial URL after #? [closed]

In WordPress, is it possible to retrieve the part of the URL after a #? I'm trying echo the_slug(); but it's showing front slug. But I want after #tag For example: I'm searching and land on this ...
0
votes
2answers
43 views

Relationship with 2 custom post types

i want to relation to custom post types. I register post types with this code add_action('init', function(){ $args = array( 'public' => true, 'query_var' => true, ...
0
votes
1answer
34 views

Costum post type with costum (sub)taxonomy

This question is probably asked before but my language not being natively english i cant really find the answer: I got a custom post type: products and custom (hierarchy) taxonomy: collection in the ...
0
votes
1answer
84 views

Remove taxonomy slug when not assigning taxonomy with custom post types

I have created a custom post type plugin that when the user assigns the post to a taxonomy (termed 'classification' in the site), it is added to the url slug. So basically it renders: ...
0
votes
1answer
95 views

Custom post type's slug gets wrong when adding a custom meta box

I'm trying for hours now to find the error moving back and forth. I have a custom post type. Everything works fine until I add my custom meta box. Now suddenly the slug gets the title of one of ...
0
votes
3answers
96 views

Custom Slug for a custom post type and default post

It's now several hours that I am trying to get this done without finding a proper solution. WHAT I WANT TO ACHIEVE I'd like WP to use the following URL structure: 1) Posts -> ...
0
votes
0answers
110 views

Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks

I have a problem currently that is related to permalinks. I have a custom Post type "workshop" and two taxonomies named "manufacturer" and "models". What i want to get and tried is this URL pattern. ...
0
votes
1answer
34 views

How to remove the category from post slug

I want to remove the category from post slug, for example a post slug like "http://my_site.com/uncategorized/hello-world/" would become "http://my_site.com/hello-world/". My search only gives ...
3
votes
1answer
338 views

Slug Formatting : Acceptable Characters?

I have done a lot of googling on this so I sincerely apologize if there is a codex entry for this but for the life of me I can not find a hard and fast rule about what characters are acceptable in a ...
0
votes
1answer
35 views

Why doesn't 'continue' work in page?

OK, so I'm working with a template (I have contacted the developer and they were of no help, so I'm modifying the template page as needed). The template displays portfolio items, using the following ...
1
vote
0answers
84 views

How to change the Author Slug from Username to Nickname and deal with Special Characters

I need to change the author slug from username to nickname: This is what is set by default: http://domain.tld/author/(username) This is what I need: http://domain.tld/author/(nickname)-(author-ID) ...
0
votes
3answers
453 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: ...
1
vote
0answers
67 views

Use category base slug in posts' permalink

The Goal I would like to format my permalinks as follows: for posts: somePrefix/%category%/%postname% for categories: somePrefix/%category% Where somePrefix is the same in both cases. I know ...
1
vote
1answer
743 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 ...
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
0answers
102 views

Change custom post type slug from URL

I have two pages showing portfolio posts, one of them shows the posts with parent category 'products', and the other one the posts with parent category 'projects'. The problem is that, the url inside ...
0
votes
1answer
77 views

Category slug not showing for Custom Post Type

I have a Custom Post Type called 'shows' which makes use of the default Wordpress Category function. I can see my 'shows' posts on /category/%postname% URL's, but when I post the URL the slug looks ...
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
2answers
2k 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
28 views

post type slug vs page slug

I having and issue with my permalinks, I wonder if someone has solved this. Basically I have a page named videos and also a post-type name videos, so I try to access to /videos I doesnt not display ...
0
votes
1answer
48 views

Wordpress Tags in class

I have added tags to my Custom Post Type. Now I want to use them to create a isotope portfolio, I can load all tags with this code: <?php $args = array( 'post_type' => 'portfolio', ...
0
votes
1answer
32 views

sort by name (slug) custom post type

What's wrong in this query ? the sortby=name doesn't change anything. $the_query = 'posts_per_page=-1&sortby=name&order=ASC&post_type=mycustom&custom_cat=mycat'; // query is made ...
0
votes
1answer
65 views

Custom Post Type archive-{post-type}.php not working

My permalink is set to a custom structure: /blog/%year%/%monthnum%/%day%/%postname%/ I have a custom post type we'll call "post-type". I also have an archive page named archive-post-type.php ...
0
votes
2answers
32 views

Slug Taken, Cant Find Which Page

I'm working on a friends site and I am attempting to update the slug example.com/blah but when I update the slug/url to /blah and click ok it updates it to /blah-2. This means that there is an ...
0
votes
0answers
45 views

Use the same slug for posts in different post types

I have 2 post types in my WordPress theme-- one is destination and the other is gallery. Both post types have a post with the title "Bagan". My problem is that I am unable to create the same ...
0
votes
2answers
2k 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
93 views

Problem with single-page for my custom post

I'm working on a website with a portfolio section, and I'm almost finished with this section, but I have a problem with the single page which is : whenever i click on any portfolio link, the single ...
1
vote
1answer
211 views

Getting author page slug from get_users() or get_userdata() functions

wp_list_authors() gives a list of author pages permalinks (site.com/author/john, site.com/author/jenny, etc). I want the same links using get_users() or get_userdata() functions instead. I need these ...
1
vote
1answer
58 views

Is there a way to have custom post type and page with the same slug?

I have a custom post type registered as follows: register_post_type( 'news', array( 'labels' => $labels, 'public' => true, 'show_ui' => true, ...
0
votes
1answer
18 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
40 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 ...
0
votes
0answers
46 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
282 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
0answers
56 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
30 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
207 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
131 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
32 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 ...
0
votes
1answer
25 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
155 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
806 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
947 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
95 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
65 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
2k views

woocommerce - products by category slug? [closed]

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
53 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
103 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 ...
0
votes
1answer
347 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 ...
2
votes
0answers
55 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 ...