Custom post types
-
Hi Marcel,
First of all thanks for this awesome plugin! I’m trying to use it in combination with multiple custom post types.
So for example: a training has a trainer (related) and additional services (related). This works like a charm. However, i’m trying to display different content for the different custom post types (a trainer might have a thumbnail while the additional services don’t).
So my question is: is there a way to create different output for the different custom post types?
I’ve tried for example:
foreach ($rel as $r) : if ( 'trainer' == get_post_type() ) { echo 'Trainer:' . $r->post_title . '<br />'; } else { echo $r->post_title . '<br />'; } endforeach;Which didn’t work. Thank in advance! 🙂
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Custom post types’ is closed to new replies.