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

-1
votes
1answer
47 views

Echo author slug in post edit page

On the Post edit page in the back-end, how do I echo the author's user_nicename? I am referring to the author of the post, not current user.
1
vote
1answer
348 views

Changing taxonomy term by slug (wp_update_term)

What I am trying to accomplish is to update a taxonomy term name using its slug rather than the $term_id Wordpress does this by: <?php wp_update_term( $term_id, $taxonomy, $args ) ?> Is it ...
0
votes
2answers
324 views

How to copy post titles to post slug in phpmyadmin

I just imported 1000 post into a custom post type on a site and the slugs are all blank. There is a problem with the importing plugin i'm using. My SQL is weak :-/ know what i need to do but not sure ...
0
votes
1answer
191 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 ...
3
votes
2answers
207 views

How to modify author base slug with groups and slug to use nice_nickname?

After reading the following suggestions from Jan Fabry regarding URL rewrite and the author slug I took the challenge in combining both solution in one. Change author base slug for different roles ...
1
vote
1answer
130 views

Wordpress plugin for nicer looking slugs? Have multiple pages named the same but they get different slugs

This wordpress site I'm touching up has a page hierarchy which is responsible for the urls. Basically the urls look like page1/subpage/subsubpage etc. The problem is, this site is for a recurring ...
4
votes
1answer
87 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 ...
0
votes
1answer
162 views

How to get or know the slug of home.php

I found this code from Different Main Navigation per category: <?php if(is_category('first-category') || in_category('first-category)) { wp_nav_menu( array('menu' => 'First Category Nav' )); ...
4
votes
1answer
132 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
88 views

How do I attach a php file to an arbitrary slug and still have access to the wp-core functions?

Based on an example found here and several others, I am trying to load a non wordpress page from a specific URL while having access to the wordpress core. I have the following code (which seems to ...
0
votes
1answer
86 views

Two Custom Post Types with Identical Articles Competing for the same Slug

I have created two custom post types, each with it's own slug. Each custom post type contains some articles with the same title. So ideally I would have . . customposttype1/mainarticle/ ...
1
vote
0answers
261 views

wp_insert_post - How do I prevent incremental numbers on child pages?

I'm using wp_insert_post to dynamically generate child pages for a given page using a predefined array of values. The goal is to give each child page the same slug. For example, clicking "Generate ...
0
votes
1answer
309 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 ...
0
votes
2answers
257 views

How to get postname in custom page?

I'm adding custom pages in WordPress and trying to handle WordPress with my own CMS. I'm using all WordPress' hooks to manage all these things. Now, I can make a custom post saying "a new album" but ...
0
votes
1answer
49 views

Ideal top-level slug methods

Right now I have a post type that generates a slug, e.g. http://url.com/l/abcd/ for each entry. I have a query in my 404.php that checks for http://url.com/abcd before output and redirects it if found ...
0
votes
2answers
179 views

custom page url slug needs illegal ?id=1 for javascript

I have created portfolio page which contains a image-slid-menu for navigation. For an menu item to appear as open, javascript gets instruction like ?id=0 appended to the url. for instance ...
0
votes
3answers
1k views

Add menu and submenu in admin with a URL instead of slug?

I use this function and hook: function mysite_admin_menu() { add_menu_page( 'Categories', 'Catégories', 'administrator', 'categories', 'a_function' ); add_submenu_page( 'categories', 'Manage', ...
3
votes
1answer
262 views

How to change ?lang=cn into /cn/

I'm trying to add languages to my wordpress driven website and i installed xili-languages plugin. Unfortunately it uses lang param to differentiate between languages and i rather have seen something ...
0
votes
2answers
827 views

Custom post types archive redirect

I had a custom post type with slug as (sometext) which I changed to (someothertext) And it works great So for example : my posts with urls like http://localhost/sometext/innerposts gets ...
1
vote
0answers
289 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 ...
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
2answers
154 views

Wordpress custom post type with folder structure in slug

I have setup a custom post type with the slug "interview" and it is working fine. I am trying to change the slug to "magazine/interview" but I keep getting 404 errors when I try to access the posts ...
0
votes
1answer
78 views

How to include stylesheet in custom admin using parent_slug

Using this code from codex: function my_enqueue($hook) { if( 'edit.php' != $hook ) return; wp_enqueue_script( 'my_custom_script', plugins_url('/myscript.js', __FILE__) ); } add_action( ...
0
votes
1answer
557 views

How to create drop down for child categories of current taxonomy being viewed?

I need to know how can I get the child/grandchild terms of the current taxonomy being viewed, and put it into a drop down so that I can add values to the options. I am currently using this code to ...
1
vote
2answers
37 views

How do I link to a blog not set as the homepage?

I have a blog here /www.mysite.com/section/news/ that only shows news in a specific category. When I use wp_get_recent_posts() and get_permalink($recent["ID"]) the link goes here ...
0
votes
1answer
274 views

Set a custom post type's title and slug to match the current date

I have seen similar questions asked, but mine is a little different. I want to register a post type called 'minutes' that doesn't allow you to add a title or a slug, but when you publish (or autosave) ...
1
vote
2answers
2k views

How does WordPress generate URL slugs?

Is there a page somewhere that details exactly how WordPress generates slugs for URLs? I'm writing a script that needs to generate URL slugs identical to the ones WordPress generates.
2
votes
2answers
704 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
395 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
1k 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
345 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
97 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
332 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
359 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
136 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
124 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
71 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
11k 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
287 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/ ...
3
votes
1answer
946 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
184 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
244 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
363 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
613 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
133 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
62 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
301 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
586 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 ...