an
groups-icon

[RELATED] is not working properly

Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
  • Version 9
    JUDE DALISMA
    0 points
    Beginner

    in the listing the shortcode [RELATED] is just going in order not by the category. I tried adding seeral extra css code like

    [RELATED orderby=rand]

    doesn’t work.

    i check the php file it does not seem it have the option to do so.

    my question is how can i add that feature if possible?

    ===========================================

    function wlt_shortcode_related($atts, $content = null){ global $wpdb, $wp_query, $CORE, $post;

    extract( shortcode_atts( array( ‘view’ => ”, ‘perrow’ => 3 ), $atts ) );

    if(isset($GLOBALS[‘relatedisset’])){ return; }
    $GLOBALS[‘relatedisset’] = true;

    if(isset($GLOBALS[‘flag-single’])){ $wasset=1; unset($GLOBALS[‘flag-single’]); }

    ob_start();
    ?>

    <div id=”wlt_shortcode_related” class=”owl-carousel wlt_search_results grid_style”>
    <?php echo do_shortcode(‘[LISTINGS dataonly=1 show=12 custom=”related”]’); ?>
    </div>

    <script>
    jQuery(document).ready(function() {
    jQuery(“#wlt_shortcode_related”).owlCarousel({ items : <?php echo $perrow; ?>, autoPlay : true, });
    });
    </script>
    <?php

    if(isset($wasset)){
    $GLOBALS[‘flag-single’] = 1;
    }

    $odata = ob_get_clean();

    return str_replace(“ppt_gal_”,”ppt_gal_related_”,$odata);

    }

    July 1, 2020 at 11:00 pm
  • fiona wylder
    0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 2, 2020 at 9:11 am

723

Views

1

Replies