Tell me more ×
WordPress Answers 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

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

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

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