Home › Forums › Exoplanet Pro › php to sliders
Tagged: slider php
- This topic has 4 replies, 2 voices, and was last updated 7 years, 5 months ago by Jérôme Bonfiglio.
-
AuthorPosts
-
June 15, 2017 at 12:59 pm #1632Jérôme BonfiglioParticipant
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.
June 16, 2017 at 8:27 am #1633AndyKeymasterHi, 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.
June 16, 2017 at 9:43 am #1634Jérôme BonfiglioParticipanthello,
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.
June 16, 2017 at 10:13 am #1635AndyKeymasterGlad 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, 5 months ago by Andy.
June 16, 2017 at 11:38 am #1637Jérôme BonfiglioParticipantre,
I didn’t thinked about updates, thanks for that i’ll try this way.
best regards.
-
AuthorPosts
- The topic ‘php to sliders’ is closed to new replies.