Secondary loop doesn’t work

'p' => $id

why you this?
and if you create show all pages on your testimonial or slider show whatever

is_page(); use condition on footer, header, index and YOUR-TEMPLATES

error code: 523