In German, there are a few commonly used subordinating conjunctions that clue the learner into the need for the past perfect, for example: "nachdem" (after) and "bevor" (before)
Nachdem er nach Hause gegangen war, machte Dietrich seine Hausaufgaben.
After he had gone home, Dietrich did his homework.
Bevor sie ins Kino ging, hatte sie Nudeln zu Abend gegessen.
Before she went to the movies, she had eaten noodles for dinner.
In the above examples, the earlier action is couched in the past perfect form (gegangen war, hatte gegessen), and “nachdem” (after) and “bevor” (before) helped sequence the actions. Further, the past perfect is more typically seen in written German, and is used less frequently in conversational German. In spoken German, there is a tendency to just use the present perfect instead of the past perfect in combination with temporal markers such as “bevor,” “vorher,” and “nachdem.”
One caveat to keep in mind, however, is that the past tense passive voice, which uses the simple past form of the verb werden (i.e. wurden) with a past participle of the main verb at the end of the sentence in regular word order, might follow the event or action that occurred earlier in the past. Thus, it is possible to see the passive voice and past perfect in the same sentence, but only the past perfect is understood as having occurred prior to the passive voice sentence. For example:
Die Hausaufgaben wurden gemacht.
The homework was done. (lit. the homeworks, as it is a plural noun in German)
Bevor die Hausaufgaben gemacht wurden, hatten die Kinder fergesehen.
Before the homework was done, the children watched TV.