ingridlc
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
my other page pulls content from a post type, but when I send it, it displays the query information for my post type, it doesn’t come back. like that
<?php /* Template Name: Documentos */ ?> <?php $current_user = wp_get_current_user(); $args = array( 'post_type' => 'documentos', 'meta_query' => array( array( 'key' => 'arquivo_usuario', 'value' => $current_user->ID, 'compare' => 'LIKE' ) ) ); $posts = get_posts( $args ); while ( have_posts() ) : the_post(); ?> <div class="container"> <div class="w-75 mx-auto"> <div class="wrapperProfile bg-transparent"> <article class="documentos"> <ul class="list-unstyled"> <?php foreach( $posts as $post ): $file = get_field('arquivo'); if( $file ): ?> <li class="itemDoc"> <a href="<?php echo $file['url']; ?>" target="_blank" title="<?php the_title();?>"> <span><?php the_title();?> </span> <i class="bi bi-arrow-down-circle"></i> </a> </li> <?php endif; endforeach; ?> </ul> </article> </div> </div> </div> <?php endwhile; ?>i happen to need to use woocommerce to create a tab by code
Viewing 2 replies - 1 through 2 (of 2 total)