Custom query by tag

WP-Filebase Pro Forums General Support Custom query by tag

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1370
    Christopher
    Participant

    I seem to be having trouble querying for files by tag. Are tags for files not like tags for posts?

    $args = array(
            'showposts' => 10000, //see comment above
            'offset' => $pagenumber,
            'orderby' => 'post_date',
            'order' => 'DESC',
            'post_type' => 'wpfb_filepage',
            'post_status' => 'publish',
            'tag' => 'church-team-member'
        );
    
        $query = new WP_Query($args);

    For some reason this will not pull the documents with the tag ‘Church Team Member’. If I take out the take I get all documents. This is for a custom page we are building outside of the plugin where we serve up files based on jobs.

    • This topic was modified 10 years, 10 months ago by Christopher. Reason: typo in code
    #1372
    Christopher
    Participant

    I solved this. I need to do a custom query with get_results because there is a separate table for the actual files.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.