Your cart is currently empty!
Homepage › Community Forums › Epik Theme Support › Portfolio isn't a page template option
Hello
I’ve trying to set up a portfolio page using your directions. Under the page templates, I have default, archive and blog. No portfolio option.
Is there something I need to do, a checkbox somewhere I have to check?
I’ve already set up the portfolio page options under Genesis | Theme Settings.
Thanks,
Charlene
First set up a page and name it Portfolo (will show on menu). No content in it.
The portfolio page pulls images and content from your “blog posts”. Be sure you have posted some, setting a featured image.
On the Genesis – Theme Settings – Portfolio page, you can select your appearance options.
I’ve done all of that, and I still don’t have the portfolio as an option in the template drop down list. What is wrong?
I’m still waiting for help on my challenge. It’s been 24 hours. My client is waiting for this site to be finished and I can’t get this feature to work. Can I please get some help? I appreciate AndyKev jumping in, but he didn’t give me anything that solves my challenge.
Let me crystal clear about what’s happening.
I’ve installed the theme and have many things working, including having a blog post in the category I want pulled into the portfolio. I have created the portfolio page and on the page, I’ve identified the category ID in the custom field with the “query_args” command. The portfolio page is ready, but when I go to the template drop-down, there is no option for Portfolio, only for default, blog and archive. I’d include a screen grab but there isn’t a way to show this.
What makes the portfolio page show up as a template option on the pages? Because it doesn’t show up in ANY PAGE ON MY SITE.
I am wondering if there is something wrong with the installation, if there is a section of PHP missing somewhere.
The portfolio is a really beautiful feature of this theme. I really love this theme and I want to use it. But my client has a deadline and I need to solve this sooner rather than later.
You do have the file in your theme page_portfolio.php? It didn’t get deleted or ??
<?php
// Template Name: Portfolio
// Adds Page Title
add_action( 'genesis_before_content', 'genesis_do_post_title' );
//Adds Page Content
add_action( 'genesis_before_loop', 'epik_do_portfolio_content' );
function epik_do_portfolio_content() {
echo '<div class="entry-content entry-portfolio" itemprop="text">' . get_post()->post_content . '</div>';
}
// Force layout to full-width-content
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
// Adds "portfolio" and "gallery clearfix" classes to every post
add_filter( 'post_class', 'portfolio_post_class' );
function portfolio_post_class( $classes ) {
$classes[] = 'portfolio';
$classes[] = 'gallery clearfix';
return $classes;
}
// Custom Read More link
add_filter( 'excerpt_more', 'portfolio_read_more_link' );
add_filter( 'get_the_content_more_link', 'portfolio_read_more_link' );
add_filter( 'the_content_more_link', 'portfolio_read_more_link' );
function portfolio_read_more_link() {
return '<a class="button more-link" href="' . get_permalink() . '" rel="nofollow">Read More</a>';
}
// Remove post info and meta info
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
/**
* Adds Featured Image and links it to the Post
*
* This is the default post image which links to the post it represents when clicked.
*
* @author Wes Straham
* @since 1.0.0
*/
add_action( 'genesis_entry_header', 'epik_portfolio_do_post_image' );
function epik_portfolio_do_post_image() {
$img = genesis_get_image( array( 'format' => 'html', 'size' => 'portfolio-thumbnail', 'attr' => array( 'class' => 'alignnone post-image' ) ) ); printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute('echo=0'), $img );
}
// Move title below post image
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_entry_content', 'genesis_do_post_title', 9 );
// Remove default content for this Page Template
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
// Add Content for the Portfolio posts in this Page Template
add_action( 'genesis_entry_content', 'epik_portfolio_do_post_content' );
function epik_portfolio_do_post_content() {
if ( genesis_get_option( 'epik_portfolio_content' ) == 'excerpts' ) {
the_excerpt();
} else {
if ( genesis_get_option( 'epik_portfolio_content_archive_limit' ) )
the_content_limit( (int)genesis_get_option( 'epik_portfolio_content_archive_limit' ), __( 'Read More', 'epik' ) );
else
the_content(__( 'Read More', 'epik' ));
}
}
// Outputs clearing div after every 2 posts
add_action( 'genesis_after_entry', 'portfolio_after_post_2' );
function portfolio_after_post_2() {
global $wp_query;
// Assumes 2 posts per row
$end_row = ( $wp_query->current_post + 1 ) / 2;
if ( ctype_digit( (string) $end_row ) ) {
echo '<div class="portfolio-clear"></div>';
}
}
// Outputs clearing div after every 3 posts
add_action( 'genesis_after_entry', 'portfolio_after_post_3' );
function portfolio_after_post_3() {
global $wp_query;
// Assumes 3 posts per row
$end_row = ( $wp_query->current_post + 1 ) / 3;
if ( ctype_digit( (string) $end_row ) ) {
echo '<div class="portfolio-clear-2"></div>';
}
}
// Remove standard loop
remove_action( 'genesis_loop', 'genesis_do_loop' );
// Add custom loop
add_action( 'genesis_loop', 'portfolio_loop' );
function portfolio_loop() {
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$include = genesis_get_option( 'epik_portfolio_cat' );
$exclude = genesis_get_option( 'epik_portfolio_cat_exclude' ) ? explode(',', str_replace(' ', '', genesis_get_option( 'epik_portfolio_cat_exclude' ))) : '';
$cf = genesis_get_custom_field( 'query_args' ); // Easter Egg
$args = array( 'cat' => $include, 'category__not_in' => $exclude, 'showposts' => genesis_get_option( 'epik_portfolio_cat_num' ), 'paged' => $paged);
$query_args = wp_parse_args($cf, $args);
genesis_custom_loop( $query_args );
}
?> <body <?php body_class('portfolio'); ?>>
<?php
genesis();
Thanks. I’m not sure how or why, but the entire page_portfolio was missing from my installation, along with the landing page. Thanks for this! I appreciate your quick and helpful responses!!