Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

venenum11 on "Recent comments support only one post types?"

$
0
0

I'd like to display attachment, posts and page in recent comments widget.

So, in default-widgets.php

$comments = get_comments( apply_filters( 'widget_comments_args', array(
			'number'      => $number,
			'status'      => 'approve',
			'post_status' => 'publish'
		) ) );

And i have changed in:

$comments = get_comments( apply_filters( 'widget_comments_args', array(
			'number'      => $number,
			'post_status' => array( 'inherit', 'pubblish', ),
			'post_type' => array( 'attachment', 'post', 'page', ),
			'status'      => 'approve',
		) ) );

But it doesn't work.

Any suggest or possible solution?


Viewing all articles
Browse latest Browse all 8245

Trending Articles