Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
wikitoki
wikitoki-web
Commits
a991ab9d
Commit
a991ab9d
authored
Mar 16, 2022
by
numeroteca
Browse files
fix incopatibility with jetpack slideshow in Quiénes page template
parent
2ab6660a
Changes
1
Hide whitespace changes
Inline
Side-by-side
page-authors.php
View file @
a991ab9d
...
...
@@ -5,16 +5,24 @@ get_header(); ?>
<?php
do_action
(
'colormag_before_body_content'
);
?>
<div
id=
"primary"
>
<div
id=
"content"
class=
"clearfix"
>
<div
id=
"precontent"
class=
"clearfix"
>
<?php
while
(
have_posts
()
)
:
the_post
();
?>
<?php
get_template_part
(
'content'
,
'page'
);
?>
<?php
do_action
(
'colormag_before_comments_template'
);
do_action
(
'colormag_after_comments_template'
);
// If comments are open or we have at least one comment, load up the comment template
if
(
comments_open
()
||
'0'
!=
get_comments_number
()
)
comments_template
();
do_action
(
'colormag_after_comments_template'
);
?>
<?php
endwhile
;
?>
</div>
<?php
// closes ---------------------?>
<
div
id
=
"content"
class
=
"clearfix"
>
<?
php
// ---------------------
// Loop through users
...
...
@@ -62,102 +70,7 @@ get_header(); ?>
<?php
get_template_part
(
'content'
,
'archive'
);
?>
<?php
endwhile
;
endif
;
?>
</div>
<!------ old way to loop through WP users TODO: remove
<hr class="separator separator--section" style="clear:both;">
<h2>Antigua manera de almacenar los usuarios para el quienes</h2>
---->
<!--
<table class="" id="wpg-list">
<thead>
<tr>
<th>img</th>
<th>nombre</th>
<th>web</th>
<th>feed</th>
<th>twitter</th>
<th>fb</th>
<th>desc</th>
</tr>
</thead>
<tbody>
<?php
// Loop through authors
$users_per_page
=
-
1
;
$args
=
array
(
'number'
=>
$users_per_page
,
);
//Query users by taxonomy user-type that is Colectivo
$tax_slug
=
"user-type"
;
$term_slug
=
'colectivo'
;
$term_object
=
get_term_by
(
'slug'
,
$term_slug
,
$tax_slug
);
$userids
=
get_objects_in_term
(
$term_object
->
term_id
,
$tax_slug
);
$args
[
'include'
]
=
$userids
;
$wp_user_query
=
new
WP_User_Query
(
$args
);
$authors
=
$wp_user_query
->
get_results
();
foreach
(
$authors
as
$auth
)
{
$author_ID
=
$auth
->
ID
;
$author_meta
=
array_map
(
function
(
$a
){
return
$a
[
0
];
},
get_user_meta
(
$author_ID
)
);
//print_r ($author_meta);
$author
=
get_userdata
(
$author_ID
);
//array with all the user data
$auth_username
=
$author
->
user_login
;
$tit
=
$author_meta
[
'first_name'
];
$desc
=
nl2br
(
$author_meta
[
'description'
]);
$desc_eu
=
nl2br
(
$author_meta
[
'description_eu'
]);
$desc_en
=
nl2br
(
$author_meta
[
'description_en'
]);
$feed
=
$author_meta
[
'feed'
];
$website
=
$author
->
user_url
;
$remove_this
=
array
(
"http://"
,
"https://"
,
"www."
);
$website_stripped
=
str_replace
(
$remove_this
,
""
,
$website
);
//removes "http://","https://","www." from website display
?>
<?php
//Makes description available in every language
if
(
function_exists
(
'pll_current_language'
))
{
//Checks if function to check language exists
$current_lang
=
pll_current_language
();
//gets current language
if
(
$current_lang
==
"eu"
)
{
//uses the appropriate description
$desc
=
(
$desc_eu
!=
""
)
?
$desc_eu
:
$desc
;
//if it is not translated it is displayed in Spanish
}
else
if
(
$current_lang
==
"en"
||
$desc_en
!=
""
)
{
$desc
=
(
$desc_eu
!=
""
)
?
$desc_eu
:
$desc
;
}
else
{
//in Spanish
}
}
else
{
echo
"IMAP functions are not available.<br />
\n
"
;
}
?>
<tr>
<td>
<?php
echo
get_wp_user_avatar
(
$author_ID
,
80
);
?>
</td>
<td>
<a href="
<?php
echo
get_author_posts_url
(
$author_ID
);
?>
">
<?php
echo
$author
->
nickname
;
?>
</a>
</td>
<td>
<a href="
<?php
echo
$website
;
?>
">
<?php
echo
$website_stripped
;
?>
</a>
</td>
<td>
<a href="
<?php
echo
$author_meta
[
'facebook'
];
?>
">
<?php
echo
$author_meta
[
'facebook'
];
?>
</a>
</td>
<td>
<a href="
<?php
echo
$author_meta
[
'twitter'
];
?>
">
<?php
echo
$author_meta
[
'twitter'
];
?>
</a>
</td>
<td>
<a href="
<?php
echo
$author_meta
[
'feed'
];
?>
">
<?php
echo
$author_meta
[
'feed'
];
?>
</a>
</td>
<td>
<?php
echo
substr
(
$desc
,
0
,
50
)
.
"..."
;
?>
</td>
<tr>
<?php
}
?>
</tbody>
</table>
-->
</div>
</div>
<!-- #content -->
...
...
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