Single Portfolio Category Template
-
Hello,
I am working on a website using OAK theme and it has a portfolio general page template.
I would like to create single portfolio pages for the portfolio categories (ie. exhibitions, expo, festivals) that has the same look as the general page but only shows the projects in the single category.The theme developer does not give support, so any help is appreciated!
Below is the portfolio page template code:
<?php /* * Template Name: Portfolio */ get_header(); ?> <?php if (get_field('portfolio_items_rollover_color')): ?> <style type="text/css"> .img .overlay-thumb:hover{ background-color: <?php echo esc_attr( get_field('portfolio_items_rollover_color') ); ?> } </style> <?php endif ?> <?php $header_portfolio = get_field('image'); ?> <?php if (get_field('use_header_image')): ?> <section class="container margin-bottom"> <div class="header-page <?php echo ( esc_attr( get_field('parallax_background') ) ) ? 'ef-parallax-bg' : '' ?>" style="background-image:url(<?php echo esc_attr($header_portfolio['sizes']['hd']); ?>)"> <div class="col-md-6 col-md-offset-6"> <div class="row"> <div class="inner-content"> <div class="header-content"> <?php if(get_field('title')) { ?> <h1><?php the_field('title'); ?></h1> <hr class="center"> <?php } ?> <?php if(get_field('description')) { ?> <?php the_field('description'); ?> <?php } ?> </div> </div> </div> </div> </div> </section> <?php endif; ?> <section class="container margin-bottom"> <div class="portfolio-wrapper"> <?php $categories = oak_get_categories('portfolio-categories', 'asc', false); ?> <?php if ($categories): ?> <button class="nav"> <span class="icon-container"> <span class="line line01"></span> <span class="line line02"></span> <span class="line line03"></span> <span class="line line04"></span> </span> </button> <div class="works-filter"> <a href="void(0)"><?php echo esc_html( 'All', 'oak' ); ?></a> <?php foreach ($categories as $category): ?> <a href="void(0)">slug); ?>"><?php echo esc_attr($category->name); ?></a> <?php endforeach ?> </div> <?php endif ?> <?php $layout = get_field('layout'); if($layout == '2-col'){ oak_load_template('portfolio-2-col', array('layout' => $layout)); } elseif($layout == '3-col') { oak_load_template('portfolio-3-col', array('layout' => $layout)); } elseif($layout == '4-col') { oak_load_template('portfolio-4-col', array('layout' => $layout)); } else { oak_load_template('portfolio-masonry', array('layout' => $layout)); } ?> </div> </section> <?php get_footer(); ?>
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Single Portfolio Category Template’ is closed to new replies.