Variable doesn't exist I get "Variable career does not exist". I'll just go straight to the code example...

{# Set ECM and get the entries stored in variable "entries" #}
{% set entries = craft.entries.getAllSections('and, not career').type('news').order('RAND()').limit(3) %}

{# Conditional statement - if more entries than 0, we output them. If false, we set other conditional statement/s. #}
{% if entries|length &gt; 0 %}

    {# Loop through entries #}
    {% for entry in entries %}      
        &lt;li&gt;
            {# My Stuff #}
        &lt;/li&gt;
    {% endfor %}

    {# Set ECM and get the entries stored in variable "career" #}
    {% set career = craft.entries.section('career').type('news') %}

{% elseif career %}

    {# Loop through career #}
    {% for career in career %}      
        &lt;li&gt;
            {# My Stuff #}
        &lt;/li&gt;
    {% endfor %}

{% endif %}


Is it because of the first variable entries?
The problem is that you are setting career inside of the if statement. Defining it there won't make it available for your elseif statement.

I've trimmed down your code so you can see exactly what the problem is:

{% set entries = ... %}

{% if entries|length &gt; 0 %}

    {% set career = ... %}

{% elseif career %}

    ...

{% endif %}


If you want career to be available to your elseif statement, you need to define it before your if statement.