im new stackoverflow, need wordpress project, have created post type projects , displaying projects function in projects page, need when user clicks on project projects appears in modal or lightbox window, problem try pass value using web refreshes , modal dissapears, me please???
this function:
/*funcion para mostrar los proyectos en la pagina de proyectos <-- jochi 17/07/2016 */ function showproyects(){ echo '<div class="row">'; $loop = new wp_query( array( 'post_type' => 'proyectos', 'paged' => $paged, 'posts_per_page'=> 15 ) ); if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $do_not_duplicate = $post->id; ?> <div class="pindex col-xs-12 col-md-4"> <h2><?php echo get_the_title(); ?></h2> <?php if ( has_post_thumbnail() ) { ?> <?php $proid = get_the_id(); ?> <a href="?projectid=<?php echo $proid;?>" rel="lightbox"> <div class="pimage opnpop"> <?php the_post_thumbnail(); ?> </div> </a> <?php } ?> <div class="pcontent"> <?php the_content(); ?> </div> <div class="btnproyect"><a class="opnpop" href="?projectid=<?php echo $proid;?>">leer más »</a></div> </div> <?php endwhile; endif; wp_reset_postdata(); echo '</div>'; } add_shortcode('show_proyects', 'showproyects');
i created shortcode use function in projects page.
Comments
Post a Comment