2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

Just an update to confirm it all works out nice, even when registering multiple custom post types.

The only downside I see is that the taxonomy used will be the same for all content types.

So if you’re using the built in Category taxonomy like I do, you’ll see the same categories everywhere, no matter if you’re writing a regular Post or a custom post type.

Thanks again for the help guys :)

64 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
PerfectPixels says
Just an update to confirm it all works out nice, even when registering multiple custom post types.

The only downside I see is that the taxonomy used will be the same for all content types.

So if you’re using the built in Category taxonomy like I do, you’ll see the same categories everywhere, no matter if you’re writing a regular Post or a custom post type.

Thanks again for the help guys :)

Hi Di,

Thanks for your feedback and glad all works for you. I think I’ll stick with my ?portfolio= permalink until the WordPress 3.1 release which would fix it…

See ya

688 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

For things like that i decided not to use post_types in my last theme and i use categories for same thing, also seraching on the net i found this today and i think it´s a very good information:

http://ottopress.com/2010/wordpress-3-0-and-custom-post-types/

So, i think i did on the right way. That was the first thing i thought once i discover how post_types works.

Keep using posts, cats and tags is the best way.

As the article says, is

5 posts
  • Has been part of the Envato Community for over 4 years
HomemRobo says

Hey @Di, nice solution, thanks. Just one question, I’m trying the exact structure, but I get 404 on my single-post_type.php templates.

If you can put here how do you manage your register_post_type setup, will be great too.

thanks

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says
Hey @Di, nice solution, thanks. Just one question, I’m trying the exact structure, but I get 404 on my single-post_type.php templates.

If you can put here how do you manage your register_post_type setup, will be great too.

thanks

See the “code used” links at the beginning of the thread and make sure you replace this:

'taxonomies' => 'locations',

with this:

'taxonomies' => 'category',

and forget about adding a custom taxonomy…

5 posts
  • Has been part of the Envato Community for over 4 years
HomemRobo says

ooops,, my question: how do you manage your templates using that Custom Post Permalinks plugin?

5 posts
  • Has been part of the Envato Community for over 4 years
HomemRobo says

ooops,, my question: how do you manage your templates using that Custom Post Permalinks plugin?

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says
ooops,, my question: how do you manage your templates using that Custom Post Permalinks plugin?

Ah… well you must go to Settings > Permalinks and you can see there a new field added. (it adds one for every custom post type you create)

I opted for:

/apartments/%category%/%apartments%.php
5 posts
  • Has been part of the Envato Community for over 4 years
HomemRobo says

Hey @Di thanks for fast reply.. I totally miss that link.. thanks. I try your solution. When I put this:

'taxonomies' => 'category',

on my arguments for register_post_type, I got this error:

Warning: Invalid argument supplied for foreach() in C:\wamp\www\mywebsite\wp-includes\post.php on line 886

I have this on the extra permalink setup:

/%category%/%post_type%/%concerto%/

I have one post type, called “concerto”. But will be others, using the same category structure. My webiste must work like this:

www.website.com/category/post_type/post_name/

I trying to achieve that “category” before the post type…

Before your code, I was using this code to register category as taxonomies for all posts types, including the default Wordpress post> register_taxonomy('category',array('post','concerto'), array( 'hierarchical' => true, 'show_ui' => true, 'query_var' => true, //'rewrite' => array( 'slug' => 'category' ), 'rewrite' => true, ));

The code: //'rewrite' => array( 'slug' => 'category' ), is commented. Any ideas?

Thanks,

Homem Robô

5 posts
  • Has been part of the Envato Community for over 4 years
HomemRobo says

Hey @Di, even with

'taxonomies' => array('category'),

my templates get 404…

I’ll keep trying,

thanks,

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by