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
2answers
975 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 ...
3
votes
1answer
431 views

Custom Post Type - Same Post Name, Different Post Type

I have 4 Custom Post Types: Services FAQs Prices Before and After I want to be able to have the same post names within each of these post types, example: Services Skin ...
1
vote
1answer
2k views

WP query by custom post type slug/name

I am running a simple wp query to retrieve just one post. But the post is a custom post-type post, not a normal post $ajaxBike = $_GET['varbike']; $bikeProfile = new WP_Query(array( 'name' ...
4
votes
1answer
415 views

Display posts with author in the url with custom post types

I'm having a really difficult time with this. I have a multi-user gallery site. Each author has his own page that lists the author's posts (this is a custom post type). I have made it so that the ...
0
votes
2answers
108 views

list child pages as slug

I have a section on my site that needs a list of pages that are descendents of a particular ID. I need them listed on the child and grandchildren pages. But the page titles are too long, so I need to ...
1
vote
1answer
394 views

Force unique page slugs across all post types

I have a site with many custom post types and I need a unique slug for each page. What I'm seeing is that wordpress only checks for slug conflicts within a post type before appending "-2", "-3". So ...
1
vote
1answer
402 views

Using Same Slug With Multiple Post Types

My Permalinks are the std %postname%. I have several custom post types, eg. 'docs'. function docs_init() { // create a new taxonomy register_taxonomy( 'docs_tax', 'docs', array( 'label' => __( ...
1
vote
1answer
24 views

Template for slug

I am using the "Edit Author Slug" plugin to provide public profile pages on my site using the following structure: mysite.com/users/username. Now, I want to show a list of all users on ...
0
votes
1answer
159 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
150 views

Get the name an the description of a link category

I have a link category with the id $id=23; and the slug $slug=friends;. I managed to read all links from that category using get_bookmarks($id). Now I also want to use the name and the description ob ...
0
votes
1answer
78 views

Two installs conflicting - Pages redirecting

I have two installs of wordpress on my server. Site 1. mysite.com Site 2. mysite.com/othersite The first wordpress install is located in mysite.com/wordpress, but is viewable at mysite.com, and the ...
4
votes
3answers
13k views

Get page content using slug

I'm trying to get page content when I only know the slug string. Is there a function for this, or an easy way to do this or is this a case of doing it via SQL? Thanks very much
2
votes
2answers
316 views

Remove Author Slug & Replace With Username

I reviewed all related questions but none tackle this exactly so I'm posting the question in hopes the pro's know how to handle this. I would like to change the author slug to remove the term /author/ ...
4
votes
1answer
1k views

Using Custom Fields in Custom Post Type URL

I'm developing a car site that has showrooms. Each showroom needs it's own custom URL based on it's location. The location (City and County/State) is already inserted as two custom fields. So for ...
2
votes
1answer
232 views

Get page slug and assign a variable within functions.php

I have created a lazy loading script using AJAX and JSON for my blog. It works perfectly. However I have 4 different blogs on the same site. These are created using custom post types. I need to get ...
0
votes
2answers
301 views

WP appending -2 to the end of my slug. Where are the originals stored so I can delete them?

I've been learning about taxonomies, custom posts etc though a lot of trial and error. I finally have it working how I want, however now I am getting some conflict with my desired slugs. I can't name ...
7
votes
1answer
409 views

Custom Post Types, slug, archive and SEO plugins

I made a custom post type called "friends". I am able to correctly list my friends using this urls: http://mysite/friends/friend1/ http://mysite/friends/friend2/ http://mysite/friends/friend3/ ...
1
vote
1answer
753 views

Does WordPress limit the length of slug names for Post Meta or Terms?

The WordPress Codex states the the Post Type Names and Taxonomy Names have a limit to the slug name. Register Post Type -- max. 20 characters, can not contain capital letters or spaces Register ...
0
votes
3answers
158 views

Echo Category Nicename

I am trying to echo the category nicename to reference a category image stored in my images folder in another folder called categories. I am using this code: $category = get_the_category(); echo ...
3
votes
1answer
66 views

which is the function that removes accented vowels?

Which is the function WP uses to convert words like "voilĂ " and "novitĂ " to "voila" and "novita" in category slug? Can I recall it in my theme?
1
vote
1answer
350 views

Rewrite post type slug only for child theme

I'm in multisite where some blogs share the same parent theme for maintenance reasons. All my cpts come from that parent theme, but I would really like that, for one of the blogs, it had an URL mask. ...
2
votes
1answer
642 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
2answers
77 views

Create a page that's to not be indexed or accessible via slug

I'm in the process of creating rather complex sites with Wordpress. I'll have a page template that collects data from other pages and shows them on one page. These pages are not used anywhere else ...
2
votes
2answers
1k views

Using custom/dynamic “slug” for a page

I have a custom page which uses a template called "Stores" http://example.com/stores/. This page will have a list of states and/or companies as categories. For this system I have a custom post type ...
0
votes
1answer
232 views

Using Page/Post Slug In Link / URL

Hope this is easy! Need to figure out (if possible) how to input my page's SLUG into a web url as a placeholder. For example: http://www.samplewebsite.com/search.ashx?t=current I need to replace ...
1
vote
1answer
1k 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 ...
1
vote
1answer
884 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
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 ...
1
vote
0answers
82 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, ...
1
vote
0answers
135 views

Problem in disabling canonical 301 redirect

I need to disable canonical redirection of category slug. My url structure for a category page looks like www.sitename.com/categorybase/categoryslug/subcategory/ Now when i change the ...
4
votes
1answer
281 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
146 views

Using custom post type parent as slug

I'm currently using the plugin 'Types Custom Post Type' to create custom post types (I know it's pretty easily done through functions.php but I was feeling a bit lazy!). Basically, I'm looking to ...
0
votes
2answers
2k 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 ...
1
vote
1answer
4k views

How do I get the slug of a custom taxonomy category of a post?

In my template file, I loop through posts that are categorized either web, print, or marketing in a custom taxonomy portfolio. How do I echo the slug of each posts category?
1
vote
2answers
428 views

slug: should I use latin characters only?

I build a legal portal in a non-latin language (Greek). I want all my content to be thoroughly indexed by search engines, preferably in Greek. Should I enter my post slugs in Greek? The pages then ...
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 ...
5
votes
2answers
4k 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 ...
4
votes
2answers
245 views

How to seamlessly redirect between different archive and singular slugs?

I have a CPT with slug function (singular) and archive slug functions (plural). Permalink structure for: singular is /function/[postname]/ archive is /functions/[page-x/]. (can poke live at ...
2
votes
2answers
2k 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: ...
2
votes
3answers
1k views

Taxonomy archive with same slug as custom post type?

My head hurts... Here is what I have: Custom post type: Our People, slug => our-peopleTaxonomy: Job Title, slug => job-title I have an archive page for the Our People CPT at domain.com/our-people. ...
0
votes
1answer
608 views

Creating /blog subsite on WP multisite network

I've had a site for a few years that till yesterday consisted of two WP 3.2.1 installations- one for the main site and one for the blog, which had a different theme and was located at [site.com]/blog. ...
1
vote
1answer
3k views

Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)

I'm using the following to bring up a tag archive page: <?php query_posts( "tag=". '' . single_tag_title( '', false ) . '' ); ?> This works perfectly for all tags of one word only, but any ...
0
votes
1answer
77 views

How can I get rid of the the category suffix--NOT “prefix” (i.e. foo-1, foo-2, etc)

I just added a new category to my WordPress site, but the WP is adding a "-2" to the url as if there was an existing category with the same name. But there isn't. There was, but I deleted it. How can ...
0
votes
2answers
751 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 ...
1
vote
1answer
42 views

Cant remove line that appears above page content

Hi all I am running a multisite I have custom page templates that are working fine however the home page displays the text below, am sure its not in the template and I am struggling to find where its ...
8
votes
3answers
2k views

Is there a maximum slug length?

A client just created a post with a really long slug (90 characters), no special characters (other than hyphens) etc. Whenever the link to that post was clicked, including the "Preview" or "View this ...
3
votes
4answers
3k views

Force post slug to be auto generated from title on save

I'm running a property site where many properties are sold in apartment blocks. Because of this what the content editors do is create a post/property with all the details and then use a duplicate ...
5
votes
4answers
136 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 ...
1
vote
1answer
4k views

Use the page slug in a WP_Query?

I'm doing some custom loops that I initialize with a query like this $the_query = new WP_Query('page_id=266'); It works fine. It's just I'ld to call my page with its slug and not its ID. Would it ...
3
votes
1answer
406 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: ...