If you want to use the PHP function "add_revslider" in your code please make sure to activate "Include RevSlider libraries globally" and/or add the current page to the "Pages to include RevSlider libraries" option in the "Global Settings" of Slider Revolution.