• Resolved AnonZ7

    (@zakaria7)


    Hello,
    i’m trying to create table, which contain Custom Taxonomy (Gender) and contain 2 categories (Male, Female), and show their counts (how many posts linked to them), and by charts (for example the pie chart)

    for that i’m using wpDataTables Plugin, but i couldn’t find the count Query
    Please Advice
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @zakaria7

    Sorry for my late reply.
    I am honestly not sure what you are asking exactly but I think you’ll need to build your own query and datatable column to get that information.
    This is however out of scope for Pods support as this doesn’t really seem Pods related.

    Cheers, Jory

    Thread Starter AnonZ7

    (@zakaria7)

    thanks for the reply, i had just to search in database (count gender), and put the code in plugin to create charts

    best regards

    @zakaria7 Would you please explain a bit more detailed how you did this? I’m trying to do the same thing. Thank you!

    Thread Starter AnonZ7

    (@zakaria7)

    hi @annaryker
    go to your database (phpmyadmin)

    select your website database, and in search type: count ‘category name’
    **don’t forget to select all tables**

    for example, i was searching for how many males and females are selected in categories, i typed: count gender

    picture to show how: https://imgur.com/a/SN3EQQg

    for me i found it in term_taxonomy, click on Browse, and it’ll take you to the code
    now just copy the code and put it in your plugin to get the charts

    my code was:

    “SELECT * FROM wp_WP7KG.wp_term_taxonomy WHERE (CONVERT(term_taxonomy_id USING utf8) LIKE ‘%count%’ OR CONVERT(term_id USING utf8) LIKE ‘%count%’ OR CONVERT(taxonomy USING utf8) LIKE ‘%count%’ OR CONVERT(description USING utf8) LIKE ‘%count%’ OR CONVERT(parent USING utf8) LIKE ‘%count%’ OR CONVERT(count USING utf8) LIKE ‘%count%’) OR (CONVERT(term_taxonomy_id USING utf8) LIKE ‘%gender%’ OR CONVERT(term_id USING utf8) LIKE ‘%gender%’ OR CONVERT(taxonomy USING utf8) LIKE ‘%gender%’ OR CONVERT(description USING utf8) LIKE ‘%gender%’ OR CONVERT(parent USING utf8) LIKE ‘%gender%’ OR CONVERT(count USING utf8) LIKE ‘%gender%’)”

    if you stuck or didn’t understand, you can email me ([email protected])

    Best Of Luck

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Count of Custom Taxonomy (Category)’ is closed to new replies.