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
28e5ba5b
Commit
28e5ba5b
authored
Jul 31, 2017
by
Nahla Shiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subcat fiche technique
parent
0ea3dfba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
fiche-technique.php
wp-content/themes/nap/fiche-technique.php
+5
-2
No files found.
wp-content/themes/nap/fiche-technique.php
View file @
28e5ba5b
...
...
@@ -18,8 +18,11 @@ $fiche_num = str_pad($nb_fiche, 6, "0", STR_PAD_LEFT);
$product_id
=
$_GET
[
'product_id'
];
$variation_id
=
$_GET
[
'variation_id'
];
$file_title
=
""
;
$product_cats
=
wp_get_post_terms
(
$product_id
,
'product_cat'
);
$file_title
.=
$product_cats
[
1
]
->
name
;
$parent_cat
=
wp_get_post_terms
(
$product_id
,
'product_cat'
,
array
(
'parent'
=>
0
,
'fields'
=>
'ids'
));
$sub_cat
=
wp_get_post_terms
(
$product_id
,
'product_cat'
,
array
(
'parent'
=>
$parent_cat
[
0
],
'fields'
=>
'names'
));
$file_title
.=
$sub_cat
[
0
];
//fiche variable
if
(
$variation_id
!=
'undefined'
){
...
...
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