Page 1 of 1

help with php code

Posted: Sun Apr 19, 2015 6:28 am
by biggy
Hi! I created a website on WordPress and I have to edit the PHP code to add a function: on the homepage there is a slider post malfunctioning, showing only an image with static text. This is the code:

-----> text code

Code: Select all

<?php if (inkthemes_get_option('colorway_slideheading1') != '') { ?> 
                                    <h2 class="title"><a href="<?php echo inkthemes_get_option('colorway_slidelink1'); ?>"><?php echo inkthemes_get_option('colorway_slideheading1'); ?></a></h2> 
                                <?php } else { ?> 
                                    <h2 class="title"><a href="#"><?php _e('Beauty at its best', 'colorway'); ?></a></h2> 
                                <?php } ?>  
                                <?php if (inkthemes_get_option('colorway_slidedescription1') != '') { ?> 
                                    <p><?php echo inkthemes_get_option('colorway_slidedescription1'); ?></p> 
                                <?php } else { ?> 
                                    <p><?php _e('What happens when beauty and simplicity connects. We tried to give you a slight hint of that with the Colorway Theme.', 'colroway'); ?></p> 
                                <?php } ?>
-----> Image code

Code: Select all

<?php if (inkthemes_get_option('colorway_slideimage1') != '') { ?> 
                                <div class="slide-image fl"><img  src="<?php echo inkthemes_get_option('colorway_slideimage1'); ?>" class="slide-img" alt="Slide 1"/> </div> 
                            <?php } else { ?> 
                                <div class="slide-image fl"><img  src="<?php echo get_template_directory_uri(); ?>/images/slider.jpg" class="slide-img" alt="Slide 1"/> </div> 
                            <?php } ?>
Can anyone tell me what is wrong with the code?
Thaks