Not true. If you can install Yosemite, you can install El Capitan. Same system requirements.
Also, some 10.6 preloaded Macs are compatible 10.12 Sierra to Mojave, and all those Macs can go directly to Sierra:
Which 10.6 Macs can install Mac OS Sierra through Mojave (10.12-10.14)
Older 10.6 Macs, the trick is to get the original installer discs if post March 15, 2010 and before 10.7's release. Applecare offers those at a nominal value.
If it is pre March 15, 2010 Mac, then you can get the retail 10.6 installer disc from the Apple online store calling 1800-MYAPPLE.
Once you install 10.6 from either original discs, or retail disc above, use the 10.6.8 combo update and security update to enable the App Store and install of 10.11 from the link below:
El Capitan System (10.11) requirements for upgrade
If your Mac is newer than 10.7's release of July 20, 2011, it is also compatible with with 10.12, which is still available free once you upgrade to the free 10.7.5. Here is the free upgrade link for Sierra and the items that are compatible with it: Upgrading to Sierra
The only reasons for staying on Yosemite include:
1. No backup. You should have a backup anyway.
2. No updates to third party software for El Capitan or Sierra compatibility. Many alternatives exist on the App Store.
3. Preference to remain on iPhone versus Apple's new Photos App, introduced in 10.10.3.
I know it is a bit an imposition to downgrade to 10.6 first before installing 10.11, but sadly that's the way Apple's Mac App Store has the updates arranged for some older Macs. But all do have an upgrade path.