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
d09b4c39
Commit
d09b4c39
authored
Jul 29, 2019
by
N. Peraldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: all files for members categories
parent
0a62cf79
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
64 deletions
+39
-64
category-departement.php
category-departement.php
+7
-0
category-epci-fiscalite-propre.php
category-epci-fiscalite-propre.php
+7
-0
category-epci-mutualisant.php
category-epci-mutualisant.php
+7
-0
category-etablissement-public.php
category-etablissement-public.php
+7
-0
category-region.php
category-region.php
+7
-0
category-ville.php
category-ville.php
+4
-64
No files found.
category-departement.php
0 → 100644
View file @
d09b4c39
<?php
$themes_path
=
get_theme_root
();
$theme_name
=
"/theme-wordpress-adullact-org"
;
$file_path
=
$themes_path
.
$theme_name
.
"/category-adherent.php"
;
include
$file_path
;
category-epci-fiscalite-propre.php
0 → 100644
View file @
d09b4c39
<?php
$themes_path
=
get_theme_root
();
$theme_name
=
"/theme-wordpress-adullact-org"
;
$file_path
=
$themes_path
.
$theme_name
.
"/category-adherent.php"
;
include
$file_path
;
category-epci-mutualisant.php
0 → 100644
View file @
d09b4c39
<?php
$themes_path
=
get_theme_root
();
$theme_name
=
"/theme-wordpress-adullact-org"
;
$file_path
=
$themes_path
.
$theme_name
.
"/category-adherent.php"
;
include
$file_path
;
category-etablissement-public.php
0 → 100644
View file @
d09b4c39
<?php
$themes_path
=
get_theme_root
();
$theme_name
=
"/theme-wordpress-adullact-org"
;
$file_path
=
$themes_path
.
$theme_name
.
"/category-adherent.php"
;
include
$file_path
;
category-region.php
0 → 100644
View file @
d09b4c39
<?php
$themes_path
=
get_theme_root
();
$theme_name
=
"/theme-wordpress-adullact-org"
;
$file_path
=
$themes_path
.
$theme_name
.
"/category-adherent.php"
;
include
$file_path
;
category-ville.php
View file @
d09b4c39
<?php
$themes_path
=
get_theme_root
();
$theme_name
=
"/theme-wordpress-adullact-org"
;
$file_path
=
$themes_path
.
$theme_name
.
"/category-adherent.php"
;
//nombre de membres à afficher par ligne
$maxMembersPerLine
=
3
;
include
$file_path
;
get_header
();
?>
<div
class=
"wrap"
>
<div
id=
"primary"
class=
"content-area"
>
<main
id=
"main"
class=
"site-main"
role=
"main"
>
<ul>
<?php
global
$post
;
//variable wp
$order
=
"asc"
;
//on récup le nom de la catégorie de l'url
$category
=
explode
(
"/"
,
$_SERVER
[
'REQUEST_URI'
])[
2
];
//on récup le tri croissant / décroissant
if
(
isset
(
$_GET
[
"order"
]))
{
$order
=
$_GET
[
"order"
];
if
(
$order
!=
"asc"
&&
$order
!=
"desc"
)
{
$order
=
"asc"
;
}
}
$args
=
array
(
'posts_per_page'
=>
10
,
'offset'
=>
0
,
'category_name'
=>
$category
,
'orderby'
=>
'title'
,
'order'
=>
$order
);
$myposts
=
get_posts
(
$args
);
echo
"<br>"
;
$count
=
0
;
//va servir pour les retour à la ligne lorsqu'on a affiché le max d'éléments par ligne
childrens_of_member_category
(
"
$category
"
);
echo
"<div class='adullact-members-list'>"
;
echo
"<div class='adullact-line'>"
;
foreach
(
$myposts
as
$post
)
:
setup_postdata
(
$post
);
$id
=
get_the_id
();
$url
=
get_metadata
(
"post"
,
$id
,
"project_url"
)[
0
];
$count
+=
1
;
?>
<a
href=
"
<?php
echo
$url
;
?>
"
target=
"_blank"
class=
"adullact-member"
>
<?php
the_post_thumbnail
(
array
(
"200"
,
"200"
));
?>
<br>
<?php
the_title
();
?>
<br>
<?php
the_tags
(
$before
=
''
);
?>
</a>
<?php
if
(
$count
>=
$maxMembersPerLine
)
{
$count
=
0
;
echo
"</div>"
;
echo
"<div class='adullact-line'>"
;
}
endforeach
;
echo
"</div></div>"
;
wp_reset_postdata
();
?>
</ul>
</main>
</div>
</div>
<?php
get_footer
();
?>
\ 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