Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NAP-wordpress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marwa Sfari
NAP-wordpress
Commits
ef77608b
Commit
ef77608b
authored
Aug 01, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]Sort category by name
parent
5601f964
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
functions.php
wp-content/themes/nap/functions.php
+2
-2
archive-product.php
wp-content/themes/nap/woocommerce/archive-product.php
+1
-1
No files found.
wp-content/themes/nap/functions.php
View file @
ef77608b
...
@@ -290,7 +290,7 @@ function nap_menu() {
...
@@ -290,7 +290,7 @@ function nap_menu() {
$menu
=
""
;
$menu
=
""
;
$taxonomy
=
'product_cat'
;
$taxonomy
=
'product_cat'
;
$orderby
=
'
id
'
;
$orderby
=
'
title
'
;
$show_count
=
0
;
$show_count
=
0
;
$pad_counts
=
0
;
$pad_counts
=
0
;
$hierarchical
=
1
;
$hierarchical
=
1
;
...
@@ -598,4 +598,4 @@ function nap_save_general_proddata_custom_field( $post_id ) {
...
@@ -598,4 +598,4 @@ function nap_save_general_proddata_custom_field( $post_id ) {
}
}
}
}
\ No newline at end of file
wp-content/themes/nap/woocommerce/archive-product.php
View file @
ef77608b
...
@@ -25,7 +25,7 @@ $cate = get_queried_object();
...
@@ -25,7 +25,7 @@ $cate = get_queried_object();
$cateID
=
$cate
->
term_id
;
$cateID
=
$cate
->
term_id
;
//SubCats
//SubCats
$child_category
=
get_terms
(
'product_cat'
,
array
(
'parent'
=>
$cateID
,
'child_of'
=>
the_category_ID
(),
'exclude'
=>
$cateID
,
'orderby'
=>
'
id
'
,
'order'
=>
'ASC'
));
$child_category
=
get_terms
(
'product_cat'
,
array
(
'parent'
=>
$cateID
,
'child_of'
=>
the_category_ID
(),
'exclude'
=>
$cateID
,
'orderby'
=>
'
title
'
,
'order'
=>
'ASC'
));
?>
?>
<div
class=
"container clearfix"
id=
"catalogue"
data-page =
"
<?php
echo
$cateID
;
?>
"
>
<div
class=
"container clearfix"
id=
"catalogue"
data-page =
"
<?php
echo
$cateID
;
?>
"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment