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);
}
This reply is for PremiumPress customers only.
505
Views
1
Replies
Copyright © 2010-2024 PremiumPress Limited.
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);
}
Members Only Content
This reply is for PremiumPress customers only.
Login Now