Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/03/2013, 05:08
Eric_Draven
 
Fecha de Ingreso: mayo-2011
Mensajes: 18
Antigüedad: 8 años, 6 meses
Puntos: 0
Respuesta: Excluir galerías según su categoría (Condicional de WP)

No, es un tema comprado.

Hay varias gallerias.

Código:
<?php
/**
 * This file is used for the masonry/Isotope Gallery post style
 * @package PhotoPro WordPress Theme
 * @since 1.0
 * @author AJ Clarke : http://wpexplorer.com
 * @copyright Copyright (c) 2012, AJ Clarke
 * @link http://wpexplorer.com
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 */
 
 
// Load Scroller Scripts
wpex_load_scroller_scripts();
 
//get post image attachments
$wpex_gallery_single_attachments = get_posts(
	array(
		'orderby' => 'menu_order',
		'post_type' => 'attachment',
		'post_parent' => get_the_ID(),
		'post_mime_type' => 'image',
		'post_status' => null,
		'posts_per_page' => -1,
		'order_by' => 'menu_order',
      	'order' => 'ASC'
	)
); ?>

<div id="galleries-wrap">  
	<div id="scroller-wrap">
		<div id="makeMeScrollable">
			<div class="scrollingHotSpotLeft"></div>
			<div class="scrollingHotSpotRight"></div>
			<div class="scrollWrapper">
				<div class="scrollableArea">
					<?php
                    //loop through attachments
                    foreach ( $wpex_gallery_single_attachments as $wpex_gallery_single_attachment ) :
                    
                    // Get and crop featured image
                    $wpex_gallery_single_img = aq_resize( wp_get_attachment_url( $wpex_gallery_single_attachment->ID,'full' ), wpex_img( 'scroller_entry_width' ), wpex_img( 'scroller_entry_height' ), wpex_img( 'scroller_entry_crop' ) );
                    
                    //include image in slider/gallery
                    if( get_post_meta($wpex_gallery_single_attachment->ID, 'be_rotator_include', true) !== '1' ) {
                    ?>
                    <article class="scroller-entry">
                    	<div class="scroller-entry-img">
                            <a href="<?php echo wp_get_attachment_url( $wpex_gallery_single_attachment->ID,'full' ); ?>" class="view" rel="gallery" title="<?php echo $wpex_gallery_single_attachment->post_excerpt; ?>">
                            	<img src="<?php echo $wpex_gallery_single_img; ?>" alt="<?php echo get_post_meta($wpex_gallery_single_attachment->ID, '_wp_attachment_image_alt', true); ?>" />
                            <span class="inner-border"></span>
                            </a>
                       </div><!-- /scroller-entry-img -->
                    </article><!-- /scroller-entry -->
                    <?php } endforeach; ?>
				</div><!-- /scrollableArea --> 
			</div><!-- /scrollWrapper -->        
		</div><!-- /makeMeScrollable -->
	</div><!-- /scroller-wrap -->
</div><!-- /galleries-wrap -->