Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hi just looking for help with this cant solve this

Thanks

Missing argument 2 for t2t_homepage_slide()XXXXXXX/index.php on line 41 and defined in/xxxxxxx/ten.php on line 94

<?php
                    $slide1 = get_option($shortname.'_slide_1'); 
                    $slide2 = get_option($shortname.'_slide_2'); 
                    $slide3 = get_option($shortname.'_slide_3'); 
                    $slide4 = get_option($shortname.'_slide_4'); 
                    $slide5 = get_option($shortname.'_slide_5'); 
                ?>
                <?php if($slide1 != '') : ?>
                    <?php t2t_homepage_slide($shortname.'_slide_1'); ?>   <--line 41
                <?php endif; ?>
                <?php if($slide2 != '') : ?>
                    <?php t2t_homepage_slide($shortname.'_slide_2'); ?>
                <?php endif; ?>
                <?php if($slide3 != '') : ?>
                    <?php t2t_homepage_slide($shortname.'_slide_3'); ?>
                <?php endif; ?>
                <?php if($slide4 != '') : ?>
                    <?php t2t_homepage_slide($shortname.'_slide_4'); ?>
                <?php endif; ?>
                <?php if($slide5 != '') : ?>
                    <?php t2t_homepage_slide($shortname.'_slide_5'); ?>

function t2t_homepage_slide($slide,$size) {     <--- line 94
    global $wpdb;

    $image = get_option($slide);
    $caption = get_option($slide.'_caption');
    $price = get_option($slide.'_price');
    $url = get_option($slide.'_url');
share|improve this question

1 Answer 1

You t2t_homepage_slide($slide,$size) function requires 2 arguments and your only calling it with one.

Either include the $size argument when calling the function or remove the requirement or provide a default when defining the function (line 94). eg:

function t2t_homepage_slide( $slide, $size = '') {     <--- line 94
    global $wpdb;

    $image = get_option($slide);
    $caption = get_option($slide.'_caption');
    $price = get_option($slide.'_price');
    $url = get_option($slide.'_url');

Also since this is a commercial theme you should be able to get the support you need from the themes support forum.

share|improve this answer

protected by toscho Jul 28 '12 at 13:48

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.