143 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • 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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 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
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • 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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 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
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • 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