I have 2 arrays of entry ID's that I need to merge and generate an entries object that I can iterate through and paginate. The reason for doing it this way at all, is that I need to display entries with a specific category, and those without any category as per the code below.
Perhaps I'm approaching this all wrong and there's a different way to get the entries.
{% set vetCategoryID = 437950 %}
{% set noPersonnelType = craft.entries.section('veterinarians').personnelType(':empty:').limit(null).ids() %}
{% set vets = craft.entries.section('veterinarians').personnelType(vetCategoryID).limit(null).ids() %}
{% set merged = noPersonnelType|merge(vets) %}
{# this displays all, but makes pagination impossible, so no dice. #}
{% for item in merged %}
{% set entry = craft.entries({id: item}) %}
{{ dd(entry) }}
{% endfor %}
I tried using {% set entries = craft.entries(merged) %}
but that doesn't work at all.
Searching here gives me this question: Converting array of entries to an array of ids, but it's the opposite problem.