Just wanted to provide a little color to @assylias' answer, which is a correct one.
The S&P 500 index is constructed according to an adjusted float weighted methodology, in which a change in the index level is defined by a Laspeyres index:
$\frac{I + \Delta I}{I} = \frac{\sum_i P_{i,t+1}*Q_{i,t}}{\sum P_{i,t}*Q_{i,t}} \,; \forall i \in I$
where: $I$ is the index level;
$P_i$ is the price of asset $i$; and,
$Q_i$ is the float adjusted share count of asset $i$.
Please reference this following S&P document for a more robust definition: http://us.spindices.com/documents/methodologies/methodology-index-math.pdf
Therefore, the S&P earnings yield can be restated as follows:
$\frac{E}{I}= \frac{\sum_i e_{i,t}*Q_{i,t}}{\sum P_{i,t}*Q_{i,t}} \,; \forall i \in I$
Where now, $e_{i,t}$ is the earnings per share of constituent, $i$.
Also, the simple aggregation of Earnings over Market Cap will provide the yield of a cap-weighted index... it serves as a very good approximation of the modified float-weighted Laspeyres index. The sum-product of corporate earnings by the ratio of float to market cap (i.e., index weightings) would be an equivalent workthrough:
$E = \sum_i ( E_{i,t}*\frac{Q_{i,t} P_{i,t}}{I}) \,; \forall i \in I$
I cannot speak exactly to Multpl's approach, but my estimates using the aforementioned methodology converge with Multpl's using S&P Capital IQ data. As an aside, I've never been able to perfectly replicate the S&P 500 total return index over time, but my average absolute daily tracking error using the above methodology is less $1 *10^{-6}\%$. I presume there are some adjustments missing or lags in my dataset. It stands to reason that results will very somewhat depending on selection of which float and which earnings to use. For example, expect different results if using GAAP earnings (i.e., net income) versus net income before non-controlling interests and extra-ordinary items. Furthermore, the calculation of float can be very nuanced.