Basically, use the same technique as in the answers to the other question - use a CASE expression, this time in the SUM instead of in the ORDER BY clause.
SELECT SUM(CASE Recommended WHEN 1 THEN 5 ELSE 1 END * Rating) AS countRating
FROM posts as Post
ORDER BY countRating DESC
If the alternative value for Recommended is 0 (a plausible guess), then you could also write:
SELECT SUM((4 * Recommended + 1) * Rating) AS countRating
FROM posts as Post
ORDER BY countRating DESC
And, indeed, you could do the same with the ORDER BY clause in the previous question.