add files
This commit is contained in:
57
template-parts/archive/ajax-load-more/author.php
Normal file
57
template-parts/archive/ajax-load-more/author.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<!--[archive/ajax-load-more/author]-->
|
||||
|
||||
<?php
|
||||
|
||||
$author = get_coauthors()[0];
|
||||
|
||||
$terms = [
|
||||
get_term_by( 'slug', 'cap-' . $author->user_nicename, "author" )->slug,
|
||||
get_term_by( 'slug', 'cap-' . $author->linked_account, "author" )->slug
|
||||
];
|
||||
|
||||
$terms = array_filter($terms);
|
||||
|
||||
$taxonomy = implode (
|
||||
":",
|
||||
array_map(
|
||||
fn ($node) => "author",
|
||||
$terms
|
||||
)
|
||||
);
|
||||
|
||||
$operator = implode (
|
||||
":",
|
||||
array_map(
|
||||
fn ($node) => "IN",
|
||||
$terms
|
||||
)
|
||||
);
|
||||
|
||||
$terms = implode(
|
||||
":",
|
||||
$terms
|
||||
);
|
||||
|
||||
$index_alm_shortcode = '
|
||||
[ajax_load_more
|
||||
cache="true"
|
||||
cache_id="' . get_alm_cache_id() . date("U") . '"
|
||||
container_type="div"
|
||||
css_classes="row"
|
||||
post_type="profile_article,anew,yellow"
|
||||
repeater="template_23"
|
||||
posts_per_page="10"
|
||||
post_format="standard"
|
||||
offset="8"
|
||||
id="archive"
|
||||
taxonomy="' . $taxonomy . '"
|
||||
taxonomy_terms="' . $terms . '"
|
||||
taxonomy_operator="' . $operator . '"
|
||||
taxonomy_relation="OR"
|
||||
]';
|
||||
|
||||
echo do_shortcode( $index_alm_shortcode );
|
||||
|
||||
?>
|
||||
|
||||
<!--[/archive/ajax-load-more/author]-->
|
||||
Reference in New Issue
Block a user