Answers.Body: <p>First you'll need to get your homepage entry:</p>
  
  <pre><code>{% set homepage = craft.entries.slug('homepage').first() %}
  </code></pre>
  
  <p>Then, you can call the field you need from <code>homepage</code>: </p>
  
  <pre><code>{{homepage.entry_icon}}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-19T23:11:37.943Z
Answers.LastActivityDate: 2015-02-19T23:11:37.943Z
Answers.UserDisplayName: Aaron Berkowitz
Answers.Body: <p>If your homepage is a Single section and you've checked the "This is for the homepage" checkbox in the section's settings, all you should need to do is:</p>
  
  <pre><code>{{ entry.icon_font }}
  </code></pre>
  
  <p>From the template you specified in the section's settings.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-19T22:33:49.440Z
Answers.Text: That works on my homepage template, but I am trying to access this from a different page template related to a different section (sorry I didn't mention that above).
Answers.UserDisplayName: Moshe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-19T22:26:59.747Z
Answers.LastActivityDate: 2015-02-19T22:26:59.747Z
Answers.UserDisplayName: Brad Bell
Body: <p>I have created a field for the homepage called icon_font.  I now want to access that field in my template.  What is the best way to do that?  Do I have to use a for loop (even though there is only one homepage)?  Any help is appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Moshe</p>
  
  <p><strong>EDIT:</strong>
  Note, the template in question is NOT my homepage template, but rather a different template which relates to a different section.</p>
  
Tags: <templating><field>
Title: Getting Attribute for Homepage
ThreadText: # Getting Attribute for Homepage
  
  (Asked by: username_0 on 2015-02-19)
  
  I have created a field for the homepage called icon\_font. I now want to access that field in my template. What is the best way to do that? Do I have to use a for loop (even though there is only one homepage)? Any help is appreciated.
  
  Thanks,
  
  username_0
  
  **EDIT:**
  Note, the template in question is NOT my homepage template, but rather a different template which relates to a different section.
  
  **Tags:** templating, field
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-02-19. Score: 2 | Accepted answer
  
  First you'll need to get your homepage entry:
  
  ```
  {% set homepage = craft.entries.slug('homepage').first() %}
  
  ```
  
  Then, you can call the field you need from `homepage`:
  
  ```
  {{homepage.entry_icon}}
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2015-02-19. Score: 0
  
  If your homepage is a Single section and you've checked the "This is for the homepage" checkbox in the section's settings, all you should need to do is:
  
  ```
  {{ entry.icon_font }}
  
  ```
  
  From the template you specified in the section's settings.
  
  > **Comments:**
  > **username_0**: That works on my homepage template, but I am trying to access this from a different page template related to a different section (sorry I didn't mention that above).  
  
  ---
  
  