思うように + [verb] 思うように + [verb (negative)]
思うようには + いかない / ならない
思うように + [noun] + が + [verb]
思うように expresses the idea of "as one hopes," "as one desires," or "as one expects." It describes whether something goes (or doesn't go) according to one's wishes or expectations. The subject's thoughts or desires serve as the benchmark against which reality is measured.
This expression is most common in the pattern 思うように + verb, where the verb describes whether the outcome matches one's expectations.
When things go well, 思うように is used with positive verbs to express that the outcome matched one's desires.
More commonly, 思うように appears in negative sentences to express frustration that reality doesn't match expectations. This is the most frequently encountered usage.
Two especially common patterns are 思うようにできない (can't do as one wishes) and 思うようにいかない (things don't go as planned).
The person doing the "thinking" is usually the sentence's subject. When you need to clarify whose expectations are being referenced, you can add a specific subject: じぶん自分が思うように (as one oneself hopes) or おや親が思うように (as the parents hope).