Support » Plugin: File Gallery » Custom template

  • Resolved tcrawford


    I am using the file gallery and it works well when displaying a single page, a single post, or a category archive (list of posts).

    I created a template file page-{slug}.php and add this to a child theme. The template shows a “page of posts” of a particular category, when opening the page with the defined slug. This works well, but the gallery on the “page of posts” is showing only one column instead of the regular three.

    The template uses only a single loop. The loop used is just the standard loop with args passed using query_posts($args), that is to say that I am not using a custom loop or multiple loops.

    I have the plugin set to display the gallery with pages and posts and it does this on other pages and posts.

    I would be very appreciative of any help on why the gallery shows incorrectly (one column instead of three) with my custom template.

    Running WP3.4 with plugin v1.7.7

    Thanks for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Aesqe


    @tcrawford: query_posts happens after wp_head, which means that the File Gallery CSS files won’t be included because the HTML HEAD part has already been generated. It’s better to use “pre_get_posts” filter, but that’s not so easy to use as query_posts, I understand that.

    If you require further assistance, I’ll certainly try to help you the best I can.

    @aesqe: I understand. I am not sure how yet, but I will try to implement a solution with the “pre_get_posts” filter. Thank you very much for your response! It is certainly much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom template’ is closed to new replies.