Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a href="{@permalink}"><img src="{@game_thumb}" width="150" height="150" align="left" /></a>
- <strong><a href="{@permalink}">{@game_title}</a></strong>
- <br/> Publisher: <a href="">{@game_publisher}</a>
- <br/> Erscheinungsdatum: {@game_releasedate}
- <br/> <a href="{@detail_url}">{@game_title}</a>
- <br/> <?php echo $obj->display( 'post_title' ); ?>
- <br/>
- <br/>
- <?php
- //get Pods object for current post
- $pod = pods( 'game', get_the_id() );
- //get the value for the relationship field
- $related = $pod->field( 'game_publisher' );
- //loop through related field, creating links to their own pages
- //only if there is anything to loop through
- if ( ! empty( $related ) ) {
- foreach ( $related as $rel ) {
- //get id for related post and put in ID
- //for advanced content types use $id = $rel[ 'id' ];
- $id = $rel[ 'ID' ];
- //show the related post name as link
- echo '<a href="'.get_permalink($id).'">'.get_the_title( $id ).'</a>';
- //get the value for some_field in related post and echo it
- $someField = get_post_meta( $id, 'some_field', true );
- echo $someField;
- } //end of foreach
- } //endif ! empty ( $related )
- ?>
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement