The slug tag has no wiki summary.
-1
votes
1answer
20 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.
0
votes
0answers
20 views
Add a prefix term in a custom taxonomy slug
I am looking to rename the slug of a custom taxonomy when inserting a new term, adding to the default slug a prefix.
For example, if the term name is "something" I want the slug is "prefix-something" ...
0
votes
1answer
35 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
64 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
48 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
68 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
24 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
42 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
0answers
39 views
No results for my WP_Query array
I have to get related posts via keywords/tags, and I found a ton of examples elsewhere on how to do it, but the query doesn't seem to produce any results. Can anyone point out how to do this, and is ...
0
votes
1answer
53 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
48 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 ...
0
votes
0answers
53 views
Filter BuddyPress Member Domain Slug
BuddyPress uses the Username(login name) as the member domain slug. (mysite.com/members/sarah)
I would like to filter the way BuddyPress handles this and set it to use the Nickname(nicename) instead.
...
0
votes
1answer
43 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
53 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 ...
-1
votes
1answer
39 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
131 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
88 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
77 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
33 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
103 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
2answers
175 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', ...
2
votes
0answers
69 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
132 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
101 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
1answer
229 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
0answers
8 views
How to assign posts to new CPT slug from DB [duplicate]
Possible Duplicate:
Renaming Custom Post Types and Taxonomies
I need to rename a CTP slug from 'cv' to 'cventries'.
When I do that , all the posts that was created under the previous slug ...
0
votes
2answers
57 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
55 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( ...
-1
votes
1answer
183 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
32 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
106 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
135 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
164 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 ...
2
votes
1answer
122 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 ...
0
votes
0answers
62 views
How to pass the term slug to the ajax function as a parameter [closed]
this is the original code of the script
var $mainCat=$('#main_cat').val();
and i replaced it with this
var $mainCat=$('#<how to pass the slug here>').val();
echo '<ul>';
foreach ...
0
votes
1answer
198 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' ...
2
votes
1answer
97 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
57 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
74 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 ...
0
votes
1answer
102 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
21 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
70 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
50 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
55 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 ...
1
vote
3answers
1k 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
141 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/ ...
1
vote
1answer
208 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 ...
0
votes
0answers
15 views
13 digit number being added to post slugs [duplicate]
Possible Duplicate:
Massive 404 issue reported by Google Webmaster Tools on a WordPress Site
Since about a month, a ton of new urls have been crawled by google that look like: ...
2
votes
1answer
95 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
82 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 ...

