Home Forums Exoplanet Pro php to sliders Reply To: php to sliders

#1635
Andy
Keymaster

Glad you have found a solution.

I would recommend that you do not modify the extras.php file directly, as your modifications will be undone if you update the theme, and you would then have to add your modification again every time the theme is updated.

A safer way to modify any of the theme functions, is to add your modifications to a child theme so that it will not be overwritten at parent theme update.

Any of the theme functions which begin with if( !function_exists( can be overridden in a child theme.

For example the function that you are modifying is the exoplanet_page_hero function which begins at line 401 of extras.php with:

if( !function_exists('exoplanet_page_hero') ){
function exoplanet_page_hero(){

You can copy the whole of the function from line 402 to line 576 to the functions.php file of a child theme, including the addition of your modified code
starts at line 402: function exoplanet_page_hero(){
ends at line 576: }

  • This reply was modified 7 years, 6 months ago by Andy.