help with php code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
biggy
Forum Newbie
Posts: 1
Joined: Sun Apr 19, 2015 6:12 am

help with php code

Post 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
Post Reply