Tagged Questions
0
votes
1answer
63 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 ...
1
vote
1answer
55 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
3answers
62 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 ...
0
votes
1answer
333 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
1answer
977 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?
0
votes
1answer
53 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
815 views
Using a portfolio_category slug in wordpress URL
I won't lie - I don't know php but I enjoy digging around trying to find ways to customize themes so that they behave how I want them to. Any help would be very much appreciated.
What I am trying to ...
3
votes
3answers
388 views
How to control which category will be picked for the slug of a post?
I'm using the permalink structure "/%category%/%postname%/".
What bothers me is that I have posts that belong to two categories. And of course, unfortunately, Wordpress always picks the wrong one for ...
0
votes
1answer
371 views
I use same slug name for category and page
I added one slug and page with the same name and they worked fine, but when creating a second WP forced me to rename the page (being created after the category) with an additional "-2" how to clear ...
0
votes
3answers
2k views
Using same slug name for a page and category
I know it isn't good practice but I'm considering using same name slugs for some pages and categories on a site that I'm working on. It's a small site and it doesn't seem to affect anything in ...
1
vote
1answer
59 views
Displaying a full post instead of a slug per category?
I have a single category on my blog that I want to display full posts in when looking at the category instead of just slugs.
The category is for Podcasts, and presently it displays slugs which:
...
0
votes
1answer
2k views
Show all posts in category
I am trying to show all posts in each category. I've been searching around and it seems I need to have either the category slug or term_id to do so, like the code below.
<?php ...
0
votes
1answer
1k views
Add category to custom post type automatically, using category slug
I'm using this excellent function to automatically add a category to my custom post type "Videos" on publish, if there's no category already chosen. This works great:
function ...
1
vote
2answers
240 views
Category slug $_SERVER['REQUEST_URI'];
I'm not sure whats wrong with this line. Have I place this incorrectly? How do I get it to recognize the $yourcat->slug;
$cat = get_query_var('cat');
$yourcat = get_category ($cat);
$uri = ...
0
votes
1answer
767 views
Listing all slugs?
I have a number of slugs and items in my custom category:
SLUG - number
video - 5 items
music - 5 items
[no-slug] - 5 items
empty - 0 items
blabla - 0 items
I want to list all non-empty slugs ...
2
votes
1answer
748 views
Create terms when registering taxonomy?
I'm registering taxonomy in my functions.php file:
register_taxonomy("our_gallery_types", array("gallery"), array("hierarchical" => true, "label" => "Categories", "singular_label" => ...
1
vote
3answers
1k views
How to create non-unique sub-category slugs?
What’s the best way to make Wordpress accept non-unique sub-category slugs?
By default, Wordpress ensures that every ‘slug’ portion of permalink URLs is unique, and is very savvy about using this to ...
2
votes
2answers
2k views
Removing the number in a category slug
I have a category that ends with -2, and there's no way I can change it back to the plain word. I know there are problems with numeric slugs, but this is just a word. I also know that a common answer ...
