Anyone know if it's possible to get back the name of the site an entry is from dynamically? Simple code example below:

{exp:channel:entries channel="news" site="siteA|siteB"}
  <p>Published: {entry_date format="%j %M %Y"} in {site_name}</p>

Tried using {site_name} and {site_label} but they just show the current site. Be nice to be able to get the site name and short name out.

Cheers, Ant

1 Answer 1


For the name you could try a conditional with entry_site_id.

<p>Published: {entry_date format="%j %M %Y"} in {if entry_site_id == 1}Site name 1{/if}{if entry_site_id == 2}Site name 2{/if}</p>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.