I would like my stores list to be alphabetical using the taxonomy shortcode. Here is what I have done;
I went to the wp-content/themes/CP/framework/class/class_shortcodes.php file
section
/* ============================================================================= [TAXONOMIES] – SHORTCODE ========================================================================== */ function wlt_page_taxonomy( $atts, $content = null ) {
global $userdata, $CORE, $post; $STRING = “”; $default_options = ‘show|hide’;
extract( shortcode_atts( array( ‘show’ => “” ,’hide’ => “”, ‘name’ => “”, ‘count’ => “yes”, ‘icon’ => “yes”, “limit” => 500, ‘perrow’ => ‘3’ ), $atts ) );
// build query $args = array( ‘taxonomy’ => $atts[‘name’], ‘orderby’ => ‘count’, ‘order’ => ‘desc’, ‘show_count’ => 0, ‘pad_counts’ => $atts[‘count’], ‘hierarchical’ => 0, ‘title_li’ => ”, ‘include’ => $atts[‘show’], ‘exclude’ => $atts[‘hide’], ‘hide_empty’ => 0,
);
I changed ‘orderby’ => ‘count’, ‘order’ => ‘desc’,
to ‘orderby’ => ‘name’, ‘order’ => ‘asc’,
The test worked, and my stores list was now alphabetical.
I changed the php back in the parent theme, and added the php changes to my child theme functions.php, but it did not work.
Can anyone show me the correct code to add to the child theme functions file?
Thanks
This reply is for PremiumPress customers only.
504
Views
5
Replies
Copyright © 2010-2026 PremiumPress Limited.
I would like my stores list to be alphabetical using the taxonomy shortcode. Here is what I have done;
I went to the wp-content/themes/CP/framework/class/class_shortcodes.php file
section
/* =============================================================================
[TAXONOMIES] – SHORTCODE
========================================================================== */
function wlt_page_taxonomy( $atts, $content = null ) {
global $userdata, $CORE, $post; $STRING = “”; $default_options = ‘show|hide’;
extract( shortcode_atts( array( ‘show’ => “” ,’hide’ => “”, ‘name’ => “”, ‘count’ => “yes”, ‘icon’ => “yes”, “limit” => 500, ‘perrow’ => ‘3’ ), $atts ) );
// build query
$args = array(
‘taxonomy’ => $atts[‘name’],
‘orderby’ => ‘count’,
‘order’ => ‘desc’,
‘show_count’ => 0,
‘pad_counts’ => $atts[‘count’],
‘hierarchical’ => 0,
‘title_li’ => ”,
‘include’ => $atts[‘show’],
‘exclude’ => $atts[‘hide’],
‘hide_empty’ => 0,
);
I changed ‘orderby’ => ‘count’,
‘order’ => ‘desc’,
to ‘orderby’ => ‘name’,
‘order’ => ‘asc’,
The test worked, and my stores list was now alphabetical.
I changed the php back in the parent theme, and added the php changes to my child theme functions.php, but it did not work.
Can anyone show me the correct code to add to the child theme functions file?
Thanks
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now