Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Adullact
Theme-WordPress-Adullact-org
Commits
b35d53d3
Commit
b35d53d3
authored
Jun 19, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 2 functions for members list
parent
4772b76c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
5 deletions
+52
-5
functions.php
functions.php
+52
-5
No files found.
functions.php
View file @
b35d53d3
<?php
add_action
(
'wp_enqueue_scripts'
,
'my_theme_enqueue_styles'
);
add_action
(
'wp_enqueue_scripts'
,
'my_theme_enqueue_styles'
);
function
my_theme_enqueue_styles
()
{
wp_enqueue_style
(
'parent-style'
,
get_template_directory_uri
()
.
'/style.css'
);
function
my_theme_enqueue_styles
()
{
wp_enqueue_style
(
'parent-style'
,
get_template_directory_uri
()
.
'/style.css'
);
}
function
childrens_of_member_category
()
{
//cette fonction affiche la liste des catégories enfants de la catégorie mère Adhérent
$childrens
=
get_term_children
(
21
,
"category"
);
//contiendra les id de tous les enfants de adhérent
?>
<a
href=
'?cat=21'
>
Tout
</a>
<?php
foreach
(
$childrens
as
$c
)
{
$category
=
get_category
(
$c
);
//objet contenant les infos de la catégorie enfant
?>
<a
href=
'?cat=
<?php
echo
$c
;
?>
'
>
<?php
echo
$category
->
name
;
?>
</a>
<?php
}
sort_page
();
?>
<?php
}
function
sort_page
()
{
$link
=
explode
(
"&order"
,
$_SERVER
[
'REQUEST_URI'
])[
0
]
?>
<a
href=
"
<?php
echo
$link
;
?>
&order=asc"
>
Croissant
</a>
<a
href=
"
<?php
echo
$link
;
?>
&order=desc"
>
Décroissant
</a>
<?php
}
?>
?>
\ No newline at end of file
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