RelatedTo in plugin based search $criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'stories';
$criteria-&gt;search = $this-&gt;query;
$criteria-&gt;order = $this-&gt;orderSql();
$criteria-&gt;limit = 1000;
$criteria-&gt;visibility = $this-&gt;checkVisibility();
$criteria-&gt;thisIsAGuide = ':empty:';


I need help adding a relatedTo criteria to help pull related entries.

The current search scope is searching on entries ("Story").
The entry("Story") contains an entry ("channel"). 
That channel has a category("brandCategories")

I need to return stories that contain entries that have a matching brandCategory.
That brandCategory is getting pulled from a GET var of "&amp;brands%5B%5D={{categoryId}}
You can create 2 queries, first you pull all the channel entries, that are related to your bandCategory

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;relatedTo = $bandCategory;
$criteria-&gt;section = 'channel';
$relatedChannelEntries = $criteria-&gt;ids();

// then continue your code 
$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'stories';
$criteria-&gt;search = $this-&gt;query;
$criteria-&gt;order = $this-&gt;orderSql();
$criteria-&gt;limit = 1000;
$criteria-&gt;visibility = $this-&gt;checkVisibility();
$criteria-&gt;thisIsAGuide = ':empty:';
// and search only for entries that are related to channel entries that are related to your band
$criteria-&gt;relatedTo = $relatedChannelEntries;