Answers.Body: <p>From a template you could do:</p>
  
  <pre><code>{% set entries = craft.entries.section('jobs').site('siteA').all() %}
  </code></pre>
  
  <p>In your follow up comment, you're passing <code>craft.entries</code> as an element to <code>relatedTo</code>, but that's just going to be an instance of the <code>ElementQuery</code> class.  You need to give it the actual element you're interested in finding the relationship to.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-17T20:48:27.950Z
Answers.Text: Thanks Brad, that's very helpful! I also found another way: 
  
  `{%set entries = craft.entries({ section: 'jobs', siteId: 2}).all() %}`
  
  Downside is, that I need to retrieve id not use handle.
Answers.UserDisplayName: Szczups
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-17T18:04:53.217Z
Answers.LastActivityDate: 2017-10-17T18:04:53.217Z
Answers.UserDisplayName: Brad Bell
Body: <p>I have a multisite on Craft 3 and I was wondering how to get section content from another site? Let's say I'm on a default site and I want to get contact content from site with handle siteA?</p>
  
  <p>Can this be done?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T16:33:26.590Z
Comments.Text: Of course, just include the siteId in your elementQuery. I'm currently on my smartphone so it's difficult to provide code but it should look like
  `$site = Craft::$app->sites->getSiteByHandle('your-handle');` and in your query you include `$elementQuery->siteId = $site->id`
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T17:15:52.863Z
Comments.Text: That's a perfectly good answer - thank you @Anubarak ! I was wondering if this is possible on the frontend using craft.entries.section? I was wondering about this approach: 
  
  craft.entries.section('sectionHandle').relatedTo(...)  - and this is where I'm stuck, because in theory I can pass an array with sourceSite attribute.
  
  When I looked in the source code, there's indeed an option to do that. 
  
  I've a section that's enabled for site with handle "default" and id = 1
  
  I'm querying this like this: 
  
  `craft.entries.section('jobs').relatedTo({ element: craft.entries, sourceSite: 1}); `
Comments.UserDisplayName: Szczups
Tags: <templating><craft3>
Title: How to get section content from another site with multisite setting
ThreadText: # How to get section content from another site with multisite setting
  
  (Asked by: username_0 on 2017-10-17)
  
  I have a multisite on Craft 3 and I was wondering how to get section content from another site? Let's say I'm on a default site and I want to get contact content from site with handle siteA?
  
  Can this be done?
  
  **Tags:** templating, craft3
  
  > **Comments:**
  > **username_1**: Of course, just include the siteId in your elementQuery. I'm currently on my smartphone so it's difficult to provide code but it should look like `$site = Craft::$app->sites->getSiteByHandle('your-handle');` and in your query you include `$elementQuery->siteId = $site->id`  
  > **username_0**: That's a perfectly good answer - thank you @Anubarak ! I was wondering if this is possible on the frontend using craft.entries.section? I was wondering about this approach:   craft.entries.section('sectionHandle').relatedTo(...)  - and this is where I'm stuck, because in theory I can pass an array with sourceSite attribute.  When I looked in the source code, there's indeed an option to do that.   I've a section that's enabled for site with handle "default" and id = 1  I'm querying this like this:   `craft.entries.section('jobs').relatedTo({ element: craft.entries, sourceSite: 1}); `  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-10-17. Score: 4 | Accepted answer
  
  From a template you could do:
  
  ```
  {% set entries = craft.entries.section('jobs').site('siteA').all() %}
  
  ```
  
  In your follow up comment, you're passing `craft.entries` as an element to `relatedTo`, but that's just going to be an instance of the `ElementQuery` class. You need to give it the actual element you're interested in finding the relationship to.
  
  > **Comments:**
  > **username_0**: Thanks username_2, that's very helpful! I also found another way:   `{%set entries = craft.entries({ section: 'jobs', siteId: 2}).all() %}`  Downside is, that I need to retrieve id not use handle.  
  
  ---
  
  