Grabbing an asset field from Page A to display on Page B I'm trying to display an asset that the client has selected to show up on the main page, and have it display on a totally different page. This sounds simple but I keep getting errors (and im learning).

Main page asset:

{% for asset in entry.donateHeaderImage %}
   &lt;img src="{{ asset.url }}"&gt;
{% endfor %}


Not sure how to display that asset on a different page in Craft.
First you need to get the entry for the main page. There are a number of ways you might do that (check the craft.entries documentation). One would be to fetch it by section handle, so assuming the main page has section handle of mainPage, you can do this:

{% set mainPage = craft.entries.section('mainPage').first %}


And then you can get the from the main page asset as before:

{% for asset in mainPage.donateHeaderImage %}
  &lt;img src="{{ asset.url }}"&gt;
{% endfor %}




To be safe, you should always handle the possibility that craft.entries won't return anything (maybe the mainPage section handle changed).

So either test it:

{% set mainPage = craft.entries.section('mainPage').first %}
{% if mainPage %}
  {% for asset in mainPage.donateHeaderImage %}
    &lt;img src="{{ asset.url }}"&gt;
  {% endfor %}
{% endif %}


Or use the powerful null-coalescing operator:

{% for asset in craft.entries.section('mainPage').first.donateHeaderImage ?? [] %}
  ...