• Hi ,
    First of all thanks for the most wonderful plugin for my blog .

    People are facing problems like images not showing up in their gallery
    But i want to exclude images obtained from a specific custom field .
    example from custom field “Logo’
    How can i do this ?
    has anyone tried it ? i have been searching for a solution since more than a month .
    I know about exclude shortcode , but i am actually not interested to use it if we have a better solution which works with Custom field template .

Viewing 1 replies (of 1 total)
  • The easiest way I think would be to include the gallery shortcode in your template file, and use the cft to pass parameters to that shortcode.

    Your use would use comma seperated ids to enter excluded images in the field. Probably not the nicest of user interfaces, but you get the idea:

    In your Custom Field Template:

    [exclude_fields]
    type= text
    label= Excluded images. Use commas to seperate images

    In your template somewhere:

    <?php
    $gallery_shortcode = '[gallery id="' . intval( $post->ID ) . '" exlude="'. get_post_meta( $post->ID, 'exclude_fields', true ) .'"]';
    echo apply_filters( 'the_content', $gallery_shortcode );
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Custom Field Template] Exluding images obtained from fields to appear in gallery’ is closed to new replies.