new functions
This commit is contained in:
@@ -266,6 +266,7 @@ function loadmore_ajax_handler()
|
||||
$args = json_decode(stripslashes($_POST['query']), true);
|
||||
$args['paged'] = $_POST['page'] + 1; // следующая страница
|
||||
$args['post_status'] = 'publish';
|
||||
$args['posts_per_page'] = 12;
|
||||
$args['cat'] = [-17, -20, -21];
|
||||
|
||||
query_posts($args);
|
||||
@@ -1099,5 +1100,17 @@ function update_categories_callback() {
|
||||
<?php
|
||||
}
|
||||
|
||||
//скрываем рекламный аккаунт
|
||||
function change_author_name($author) {
|
||||
$original_author = 'Анна Купровская'; //рекламный аккаунт
|
||||
$new_author = 'agroexpert.press';
|
||||
|
||||
if ($author === $original_author) {
|
||||
echo $author;
|
||||
return $new_author;
|
||||
}
|
||||
|
||||
return $author;
|
||||
}
|
||||
add_filter('the_author', 'change_author_name');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user