Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extra filtering on admin stats screen for categories, tags, custom taxonomy, custom taxonomy tag/category terms. #273

Open
chriskostelec opened this issue Sep 14, 2020 · 2 comments

Comments

@chriskostelec
Copy link

chriskostelec commented Sep 14, 2020

I was hoping the stat screen at wp-admin/options-general.php?page=wordpress-popular-posts&tab=stats would only log posts that my wpp_get_mostpopular() template tag was tracking. I know you can only show certain post types by clicking the gear, but it would be great if we could filter further by categories, tags, custom taxonomy, and custom taxonomy tags/categories (not sure if they should be separate inputs or all custom taxonomy things in one input).

Mockup idea:

image

Just to make sure I am not doing something wrong, this is what I'm doing:

if ( function_exists('wpp_get_mostpopular') ) {
  $args = array (
    'limit' => 5,
    'range' => 'last30days',
    'order_by' => 'views',
    'post_type' => 'resources',
    'taxonomy' => 'resource-categories',
    'term_id' => '16',
    'stats_views' => false,
    'wpp_start' => '<ol class="most-read-wrapper">',
    'wpp_end' => '</ol>',
    'post_html' => 
    '<li class="most-read">
      <a href="{url}">
        <h3>{text_title}</h3>
        <span class="article-title-sm">{label}</span>
      </a>
    </li>'
  );
  wpp_get_mostpopular( $args );
}

I know there is a wpp_trackable_post_types filter that would cover it if I only needed to filter by post type, but unfortunately that doesn't cover my situation. Maybe it's not so easy, but it would be nice. Thanks!

@cabrerahector
Copy link
Owner

Hi @chriskostelec,

Thanks for the suggestions and the mockup! I agree that this may be useful for some people so I'll think about it. This would be super low priority though and you may have to wait for a while so please keep that in mind.

I'll leave a comment here whether I decide to implement this as I'd surely need your help testing this.

Have a nice day!

@chriskostelec
Copy link
Author

No worries, just thought I'd mention it!

@cabrerahector cabrerahector added this to the 7.0.0 milestone Jun 16, 2023
@cabrerahector cabrerahector removed this from the 7.0.0 milestone Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants