---
title: "Customizing Kadence Related Posts with kadence_related_posts_args Filter"
source: "https://docs.nexcess.com/software/kadence/theme/customize-related-posts-with-kadence_related_posts_args/"
description: "When you enable Related Posts in Kadence Theme, it will automatically display up to six related posts that share similar categories or tags with the current pos…"
vertical: "Software"
area: "Kadence Theme"
date: "2025-10-20"
last_modified: "2026-07-02"
---

# Customizing Kadence Related Posts with kadence_related_posts_args Filter

When you enable **[Related Posts](https://docs.nexcess.com/software/kadence/theme/single-post-layout-customizer-settings/#related-posts)** in Kadence Theme, it will automatically display up to **six related posts** that share similar **categories** or **tags** with the current post. The current post is excluded, and the results are shown in random order.

If you want to change how many posts appear, what post types are included, or how they are ordered, you can use the **kadence\_related\_posts\_args** filter.

This filter lets you control the query Kadence uses to fetch related posts without editing any theme files.

Examples:

Show only posts from the same custom taxonomy and limit to three posts

```php
add_filter( 'kadence_related_posts_args', function( $args ) {
    $args['tax_query'] = array(
        array(
            'taxonomy' => 'topic',
            'field'    => 'slug',
            'terms'    => wp_list_pluck( get_the_terms( get_the_ID(), 'topic' ), 'slug' ),
        ),
    );
    $args['posts_per_page'] = 3;
    $args['orderby'] = 'date';
    $args['order'] = 'DESC';
    return $args;
});
```

Show related posts from the same author

```php
add_filter( 'kadence_related_posts_args', function( $args ) {
    $args['author'] = get_post_field( 'post_author', get_the_ID() );
    return $args;
});
```

Include custom post types

```php
add_filter( 'kadence_related_posts_args', function( $args ) {
    $args['post_type'] = array( 'post', 'news', 'article' );
    return $args;
});
```

Exclude certain categories

```php
add_filter( 'kadence_related_posts_args', function( $args ) {
    $args['category__not_in'] = array( 10, 25 );
    return $args;
});
```
