• Resolved Penfold1000

    (@penfold1000)


    I am using Isotope to do some funky filtering options based on the categories in MLA.

    How do i query the database to get the list of categories under Att. Categories

    Apologise – having a bit of brain freeze!

    CHRIS

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for the question. You wrote “query the database“; I assume that means you need some SQL help.

    Here’s the simplest query I can think of:

    
    SELECT <code>wp_terms</code>.*, <code>wp_term_taxonomy</code>.* FROM <code>wp_terms</code> LEFT JOIN <code>wp_term_taxonomy</code> ON <code>wp_terms</code>.<code>term_id</code> = <code>wp_term_taxonomy</code>.<code>term_id</code> WHERE wp_term_taxonomy.taxonomy = 'attachment_category' 
    

    NOTE: the <code> and </code> literals in the above example must be replaced by “backtick” characters.

    You may have to change the wp_ prefix, but the rest should work. You will get all the information there is. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestion.

Viewing 1 replies (of 1 total)

The topic ‘Querying categories’ is closed to new replies.