Forum Replies Created
-
AuthorPosts
-
psandersMember
Actually, I've learned that it's not the portfolio template that's the problem. It's that the archive-portfolio type (custom portfolio post type archive template, that is) isn't automatically creating the portfolio page and populating it with entries. This has happened on every install I've done of Minimum Pro. Any ideas?
Here's what my archive-portfolio.php looks like:
/**
* The custom portfolio post type archive template
*///* Force full width content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );//* Add even/odd post class
add_filter( 'post_class', 'minimum_even_odd_portfolio_post_class' );
function minimum_even_odd_portfolio_post_class( $classes ) {global $wp_query;
$classes[] = ($wp_query->current_post % 2 == 0) ? 'portfolio-odd' : 'portfolio-even';
return $classes;}
//* Remove the entry meta in the entry header
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );//* Remove the entry content
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );//* Remove the entry image
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );//* Add the featured image after post title
add_action( 'genesis_entry_content', 'minimum_portfolio_grid' );
function minimum_portfolio_grid() {if ( $image = genesis_get_image( 'format=url&size=portfolio' ) ) {
printf( '<div class="portfolio-image"></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );}
}
//* Remove the entry meta in the entry footer
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );//* Run the Genesis loop
genesis();psandersMemberI added the comment:
/*
Template Name: Portfolio
*/Previously, the comment was :
/**
* The custom portfolio post type archive template
*/The page for the portfolio is:
psandersMemberHere's the link to my portfolio archive page .
I have updated the permalinks and changed the header comment in the archive-portfolio.php file to get Genesis to recognize it. That's all.
I see the divs for one article in the source for the page, but they're empty. It may be that the printf function never executes in the archive .php file.
psandersMemberThanks for your response. Actually, I'm not having trouble adding new portfolio entries. It's the entire portfolio archive page which was missing. The archive-portfolio.php file is in the theme folder, but it doesn't populate the archive page with thumbnails of the portfolios I have.
-
AuthorPosts