Home Forums Exoplanet Pro php to sliders

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1632
    Jérôme Bonfiglio
    Participant

    Hello,

    I would like to add some php code in the sub title arrea in slide settings but i obviously can’t add it directly

    the goal is to have a little  product slider in each slide (slideception) like:

    slide 1                                                 slide2                                                     slide 3

    |                 books             |                  |            stationery         |                      |                 others                  |

    |                                         |                  |                                       |                      |                                               |

    How can i do that ?

    Thanks for help.

    #1633
    Andy
    Keymaster

    Hi, the functionality you you describe is beyond the scope of minor modifications and beyond our support policy.

    It would require quite a lot of custom coding and testing, and an option would maybe find a reputable freelance coder/developer on Upwork for this kind of custom service.

    #1634
    Jérôme Bonfiglio
    Participant

    hello,

    i’ve done some tricks into extra.php

    if ( $subtitle ) {?>
    <div class=”slide-cap-desc animated fadeInUp”>
    <?php echo do_shortcode(‘[wd_asp id=’.$subtitle.’]’ ); ?>
    </div>
    <?php }

    this way i just have to put the shortcode id into subtitle area to get the good one on the good slide.

    ty anyway, have a nice day.

    #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.
    #1637
    Jérôme Bonfiglio
    Participant

    re,

    I didn’t thinked about updates, thanks for that i’ll try this way.

    best regards.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘php to sliders’ is closed to new replies.