Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Ajay

    (@ajay)

    Please use the category id instead with exclude_categories

    Thread Starter Marco Amaral

    (@maamaral)

    Sorry, but it doesn’t work!

    There are a workaround?

    Plugin Author Ajay

    (@ajay)

    What’s the code that you’re using?

    Also, could you please disable the cache.

    Thread Starter Marco Amaral

    (@maamaral)

    I’m using this shortcode: [tptn_list exclude_categories=”21,13,1,10″]
    [/tptn_list]

    Cache is disabled by default in Top10 settings.

    Am i doing something wrong?

    Plugin Author Ajay

    (@ajay)

    [tptn_list exclude_categories="21,13,1,10"] should suffice.

    What are you seeing in the output. Can you point me to the page with the specific outputs?

    Thread Starter Marco Amaral

    (@maamaral)

    That shortcode list top 5 posts from all categories… same listed in “view popular posts”. That shortcode don’t filter top posts…

    Until now, site development were made in intranet server, but in a while we can migrate to a “internet” server. Maybe in that moment, you can see that shortcode outputs!

    Plugin Author Ajay

    (@ajay)

    Hi, that might be useful. Since you’re in development mode, it might be useful to run a couple of checks in your end e.g. putting the exclude categories in the Settings page which impacts the plugin globally and seeing what the output is.

    I’ll run a couple of checks at my end as well as a test.

    Thread Starter Marco Amaral

    (@maamaral)

    Hi,

    yes i already tried to put excluded categories in settings page, and it works perfectly!! But in shortcode it didn’t work!!

    Thanks for your support.

    Plugin Author Ajay

    (@ajay)

    That is good to hear. At least one thing is working. Do you have Query Monitor plugin installed?

    Can you check the query used on the page using this one?

    Thread Starter Marco Amaral

    (@maamaral)

    Hi,

    what an excellent tool!! With Query monitor i can see 2 tptn wuerryb callers:

    get_tptn_pop_posts
    SELECT DISTINCT ID, postnumber, cntaccess as sumCount
    FROM wpm_top_ten
    INNER JOIN wpm_posts
    ON postnumber=ID
    WHERE 1=1
    AND blog_id = 1
    AND wpm_posts.post_status = ‘publish’
    AND wpm_posts.post_type IN (‘post’)
    ORDER BY sumCount DESC
    LIMIT 25

    and

    tptn_exclude_post_ids
    SELECT post_id, meta_value
    FROM wpm_postmeta
    WHERE meta_key = ‘tptn_post_meta’

    A simple note: wpm_ is my wordpress table prefix, it’s not a strange thing!!

    I tried, but i didn’t see, with Query monitor, the output of that select queries.

    So, you need more information?

    Plugin Author Ajay

    (@ajay)

    Is the query above with the exclude categories in the Settings page?

    Thread Starter Marco Amaral

    (@maamaral)

    No

    Plugin Author Ajay

    (@ajay)

    Please add it there and repost the query?

    Thread Starter Marco Amaral

    (@maamaral)

    I now know what it was wrong!!

    I have assumed that child categories have some relationship with parent categories, and when i wrote a parent category id in exclude categories it exclude all child categories… But that is wrong!

    I now wrote ALL categories in exclude categories list and all works fine!

    Sorry for your time and work whit this (my fault) issue.

    Plugin Author Ajay

    (@ajay)

    Hi, I’m glad you were able to sort it out. Happy to have been able to help.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Top posts filtered by category’ is closed to new replies.