• I am currently using the advanced post slider and wondering where you can create a fallback image. So where it is the featured image, if else can we.. for example

    <?php
    if(has_post_thumbnail()){
    $advps_custom_thumb = $wpdb->get_results(“select width,height from “.$wpdb->prefix.”advps_thumbnail where thumb_name = ‘”.$container[‘advps_thumbnail’].”‘”);
    if($advps_custom_thumb){
    $thmb_image = wp_get_attachment_url( get_post_thumbnail_id());
    $advps_image = aq_resize( $thmb_image, $advps_custom_thumb[0]->width, $advps_custom_thumb[0]->height,$advps_custom_thumb[0]->crop,true,true);
    echo ‘<img src=”‘.$advps_image.'” width=”‘.$advps_custom_thumb[0]->width.'” height=”‘.$advps_custom_thumb[0]->height.'” alt=”‘.get_the_title().'” />’;
    }
    else
    {
    the_post_thumbnail($container[‘advps_thumbnail’]);
    }
    }
    elseif(isset($container[‘advps_default_image’]) && $container[‘advps_default_image’] != ”)
    {
    ?>
    <img src=”<?php echo $container[‘advps_default_image’];?>” class=”wp-post-image” alt=”<?php the_title();?>” />
    <?php
    }
    ?>

    https://ww.wp.xz.cn/plugins/advanced-post-slider/

The topic ‘Fallback Image’ is closed to new replies.