If you are using two or more php snippets in the same node - or on your front_page.module page - add the following line at the beginning of each php snippet you intend to use
The reason is to avoid the problem of using the
return $output; more than once in the same node. The
return $output command will end the reading of code and all subsequent code or text in that node (or front_page) will be ignored.
To avoid potential problems, rather than
return $output;, you can use...
With each subsequent php-generated list you create in that same node (or front_page), you will get a cumulative list -- the content generated by each additional php snippet will be added to the
$output list. (For example, the second php snippet's list of posts on "apples" would be added to the first php snippet's list of posts on "oranges," when what you really want is just a list of posts on "apples.")
So how would one "clear" the output results so one can have another php snippet creating output? Start each of your subsequent snippets of php code with this:
This will clear the previous results so that your 2nd, 3rd ... nth list will have unique results relevant to its own query.
Thus you will be able to have several php-generated outputs on the same page (such as lists of recent posts in several different taxonomy terms) without conflict or intermingling of results.