The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Altering Templates (2 posts)

  1. subcutanea
    Posted 3 years ago #

    Yes, yes, I know, we should NEVER do it (but we all do!)
    I have a theme (Hero By Manishg), which I'm really enjoying. I've been able to tweak it considerably and all's going good. I would like to insert an accordion-style header onto the homepage instead of the existing NivoSlider.
    php currently reads:

    <div id="home-container">
    	<div id="slider" class="nivoSlider">
    <?php for ($i = 1; $i <= 2; $i++) { ?>
    			 <img src="<?php if(of_get_option('slider_image'.$i) != NULL){ echo of_get_option('slider_image'.$i);} else echo get_template_directory_uri() . '/images/slide'.$i.'.png' ?>" alt="<?php echo of_get_option('slider_head'.$i); ?>" <?php if(of_get_option('slider_box') != 'off'){ ?> title="<span class='info-title'><?php if(of_get_option('slider_head'.$i) != NULL){ echo of_get_option('slider_head'.$i);} else echo "Professional Business WordPress theme" ?></span><p><?php if(of_get_option('slider_text'.$i) != NULL){ echo of_get_option('slider_text'.$i);} else echo "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae." ?></p><span class='read-more-slide'> <a href='<?php echo of_get_option('slider_link'.$i); ?>'><?php _e( 'Read More', 'Hero' ); ?></a></span>" <?php } ?> />
    			<?php } ?>
    		</div> <!--slideshow end-->
      </div><!--home container end-->

    What I'd like to do is echo my current gallery1, which I've created using jquery accordion slideshow plugin.

    Does anybody have a suggestion?

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Yes, yes, I know, we should NEVER do it (but we all do!)

    No, you should be using a Child Theme to modify any theme files. That way, changes won't be overwritten when the theme is updated.

    Have you asked on the theme's dedicated forums?


Topic Closed

This topic has been closed to new replies.

About this Topic