Print selected fields from a referenced node Using entity reference, i have been able to link a node of type blog to another node of my custom content type, "challenge", by creating a field under blog of type entity reference. Great. Now, when the blog is published, some fields (not all) from the linked custom content type should also be displayed there. For ex, in my custom content type, there are some fields as title,body,image1,image2,sponsor, some flags using the flag module and other fields. I want that only some fields which i mentioned should be displayed on the blog (no flags etc to be displayed). SO what i do is under Manage Display for blog i select Rendered Entity for display. What this does is gets all the fields from the referenced/linked node. However i want some fields not all. Now what i do is write a custom node--blog.tpl.php. I then hide everything from content as:

&lt;?php
   hide($content['title']);
   hide($content['field_blog_pic']);
   hide($content['field_challenge_name']);
   hide($content['field_challenge_pic']);
   hide($content['field_sponsor']);
   hide($content['field_sponsor_logo']);
   hide($content['field_sponsor_description']);
 ?&gt;


Then i tried rendering the fields one by one. It is ok for the field of type blog but the moment i do a print_render($content['field_challenge_name']) then all fields from the referenced node (of my custom content type, challenge) get displayed. How can i just select a few fields for display of the referenced node.

If it helps, here's my node--blog.tpl.php:

    &lt;div class ="in-blog-pic"&gt;
     &lt;?php
       print render($content['field_blog_pic']);
     ?&gt;
    &lt;/div&gt;

    &lt;div class ="in-blog-title"&gt;
     &lt;?php
        print $title;
     ?&gt;
    &lt;/div&gt;

    &lt;div class="in-blog-comment-count"&gt;
     &lt;?php
        print $comment;
     ?&gt;
    &lt;/div&gt;

    &lt;div class="in-blog-name-user"&gt;
     &lt;?php
        print $name;
     ?&gt;
    &lt;/div&gt;

    &lt;?php
    /** $user = user_load($user-&gt;uid);
      print theme_image_style(
                    array(

                        'path' =&gt; $user-&gt;picture-&gt;uri,
                        'attributes' =&gt; array(
                            'class' =&gt; 'in-blog-user'
                        )            
                    )
                );        
    */
    ?&gt;
    &lt;div class="in-blog-user-pic"&gt;
 &lt;?php
   $user = user_load($uid);
   print theme('user_picture', array('account' =&gt;$user));
 ?&gt;
&lt;/div&gt;

&lt;div class="in-blog-title-below"&gt;
 &lt;?php
  print $title;
 ?&gt;
&lt;/div&gt;

&lt;?php
   hide($content['title']);
   hide($content['field_blog_pic']);
   hide($content['field_challenge_name']);
   hide($content['field_challenge_pic']);
   hide($content['field_sponsor']);
   hide($content['field_sponsor_logo']);
   hide($content['field_sponsor_description']);
   hide($content['field_categories']);
?&gt;
&lt;div class="in-blog-body"&gt;
 &lt;?php
  print render($content);
 ?&gt;
&lt;/div&gt;

&lt;?php /*
&lt;div class="in-blog-challenge-name"&gt;
  &lt;?php
     print render($content['field_challenge_name']);
  ?&gt;
&lt;/div&gt;
*/?&gt;


All fields get displayed of the referenced node once i do the last few lines

&lt;div class="in-blog-challenge-name"&gt;
      &lt;?php
         print render($content['field_challenge_name']);
      ?&gt;
    &lt;/div&gt;
    ?&gt;


So after all that blabbering, all i want to ask is how to print some selected fields of a referenced node (here my custom type, "challenge") onto the referencing node (here, blog)...

Regards
I would use Display Suite for this problem. Using it, you can define an extra view mode for the referenced node type, with just the fields you want, then configure the display of the entity reference field to use that view mode. We are doing this in the current project I am working on, and it's just the ticket.