private function selectByCategory($queryObject, $categoryID, $postTypeSlug)
    {
        $categoryRelationTable = categoriesRelationTable($postTypeSlug);
        return $queryObject->join($categoryRelationTable, $categoryRelationTable.'.postID', $postTypeSlug.'.postID')
            ->where($categoryRelationTable.'.categoryID', '=', $categoryID);
    }
private function selectByCategory($queryObject, $categoryID, $postTypeSlug)
    {
        $categoryRelationTable = categoriesRelationTable($postTypeSlug);
        return $queryObject->join($categoryRelationTable, $categoryRelationTable.'.postID', $postTypeSlug.'.postID')
            ->where($categoryRelationTable.'.categoryID', '=', $categoryID);
    }
private function selectByCategory ( $ queryObject , $ categoryID , $ postTypeSlug ) { $ categoryRelationTable = categoriesRelationTable ( $ postTypeSlug ) ; return $ queryObject -> join ( $ categoryRelationTable , $ categoryRelationTable . '.postID' , $ postTypeSlug . '.postID' ) -> where ( $ categoryRelationTable . '.categoryID' , '=' , $ categoryID ) ; }
Joins post with category and selects only ones that have the specific category.

@param  object $queryObject
@param  int    $categoryID
@param  string $postTypeSlug
@return mixed
Joins post with category and selects only ones that have the specific category .