category-archives
-
Hello i made a portfolio archive and is working fine. Now i’m triying to made four diferent adaptations for four categories. This is my category-imatge-coorporativa.php
<?php /** * * @author Ivan Ortiz & Xavier Guerrero Calduch */ //* Template Name: Portfolio Imatge Coorporativa //* The template for displaying the portfolio of our website. get_header(); ?> <div id="primary" class="content-area"> <main> <?php get_template_part("template-parts/content","page"); $args = array( 'post_type' =>portfolio, ); $query = new WP_Query( $args ); if ( $query->have_posts()) : while ( $query->have_posts() ) : $query->the_post(); if(is_category("Imatge coorporativa")): $image = get_field('imagen'); if( !empty($image) ): ?> <article class="article-portfolio"> <a href="<?php the_permalink(); ?>"> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> </a> </article> <?php endif; endif; endwhile; endif; ?> </main> </div> <?php get_footer(); ?>When i refesh the permalinks and seacrh http://www.location.com/imatge-coorporativa, a 404 error is displayed.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘category-archives’ is closed to new replies.