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

    (@bradvin)

    Hi @pstretch

    Yes there is, for custom post types you need to add a snippet of code to tell FooGallery to watch out for your custom post type.

    
    function pstretch_foogallery_allowed_post_types_for_attachment( $post_types ) {
      $post_types[] = 'news';
      $post_types[] = 'events';
      return $post_types;
    }
    add_filter( 'foogallery_allowed_post_types_for_attachment', 'pstretch_foogallery_allowed_post_types_for_attachment' );
    

    By default FooGallery only cares about posts and pages, so it needs the code above added to your theme’s functions.php

    Thread Starter pstretch

    (@pstretch)

    Perfect, that’s got it working.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gallery usage with custom post types with v1.7.7’ is closed to new replies.