Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $argsgaleria = array('orderby' => 'title',
- 'order' => 'ASC',
- 'posts_per_page'=>-1,
- 'post_type' => 'galeria'
- );
- $myposts2 = get_posts( $argsgaleria );
- foreach ( $myposts2 as $post ) : setup_postdata( $post );
- $gal_id = $post->ID;
- $checked2 = is_array($gals) && isset($gals[$gal_id]) && in_array(get_the_ID(), $gals[$gal_id]) ? 'checked="checked"' : '';
- ?>
- <p><label>
- <input <?php echo $checked2; ?> type="checkbox" name="myposts_gal[<?php echo $gal_id;?>][<?php echo $id_pro;?>]" value="<?php the_ID(); ?>" id="myposts_gal[]" /><?php the_title(); ?>
- </label></p>
- <?php
- endforeach;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement