143 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
cramdesign says

Hey, I would really appreciate a bit of help…

I have a custom post type, porfolio, and custom taxonomy, portfolio-category. What I need to do is to get the categories of the current post and list the titles of other posts in the same categories.

It has me baffled but then that show where I am at with wp I guess… anyway, if you know the way, I would really appreciate it.

Cheers…

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says
cramdesign said
Hey, I would really appreciate a bit of help…

I have a custom post type, porfolio, and custom taxonomy, portfolio-category. What I need to do is to get the categories of the current post and list the titles of other posts in the same categories.

It has me baffled but then that show where I am at with wp I guess… anyway, if you know the way, I would really appreciate it.

Cheers…

Hi,

this should do thje job, with a custom loop/query gets all the posts that belong to the same taxomies of the current post (global $post)

http://pastie.org/2812562

Let me know,

Parker

143 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
cramdesign says

Thank you for posting. I can’t get this to work, though it may be my error. Does it go within the main look or out?

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says
cramdesign said
Thank you for posting. I can’t get this to work, though it may be my error. Does it go within the main look or out?

Hi,

outside or within, depending on where you’re using, if into an archive or a single template. Are you getting an error or what?

Do your post belong to any taxonomy/category?

Parker

143 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
cramdesign says

It is a single template. It doesn’t generate anything in the html and I don’t really know a way to check what the php is doing other than just to throw some echo statements in there (I am sure there is a better way). Here is my code for single-portfolio.php: http://pastie.org/2814904

by
by
by
by
by
by