Does your custom code work? Is it causing a PHP error to cut off the rest of the page?
It’s possible that the
setup_postdata function is causing the widgets to misbehave.
Perhaps you can test this by removing the
setup_postdata function and the
Your loop code may not work as expected (due to the incorrect $post object), but it will help debug the issue.