… and how do I do that ?
Do I make the changes here ?
* Shortcode to display product in grid views
*
*/
add_shortcode(‘dpsc_grid_display’, ‘dpsc_pnj_grid_display’);
function dpsc_pnj_grid_display($atts, $content=null) {
$dp_shopping_cart_settings = get_option(‘dp_shopping_cart_settings’);
extract(shortcode_atts( array(
‘category’ => ‘1’,
‘total’ => ’12’,
‘column’ => ‘3’,
‘per_page’ => ”,
‘type’ => ‘post’,
‘order’ => ‘DESC’
), $atts));
if (!empty($per_page)) {
$pagenum = isset($_GET[‘dpage’]) ? $_GET[‘dpage’] : 1;
$count = count(get_posts(‘numberposts=’ . $total . ‘&post_type=’ . $type . ‘&meta_key=price&category=’ . $category));
$page_links = paginate_links( array(
‘base’ => add_query_arg( ‘dpage’, ‘%#%’ ),
‘format’ => ”,
‘prev_text’ => __(‘«’),
‘next_text’ => __(‘»’),
‘total’ => ceil($count / $per_page),
‘current’ => $pagenum
));
$post_offset = ($pagenum-1) * $per_page;
$offset = ‘&offset=’.$post_offset;
$page_links = ” . $page_links . ”;
}
else {
$per_page = $total;
$offset = ”;
$page_links = ”;
}
if ($order != ‘rand’) {
$order_string = ‘orderby=post_date&order=’ . $order . ‘&’;
}
else {
$order_string = ‘orderby=rand&’;
}
THANK YOU FOR YOUR HELP