Two weeks ago I unveiled a minimalist design on my website. You’ll see in the comments I was asked a number of times if (or when) that design was going to be available on StudioPress.
Normally I make folks sweat it out a few months, but this time around I’m throwing y’all a bone and developing the Minimum 2.0 theme which should be available soon.
For those of you who purchased Minimum 1.0 you will receive access to this free of charge.
But that’s just the beginning of the Christmas stocking I have in store for you – I’m taking the updated Minimum theme to a place that I’ve wanted to go for quite some time.
Introducing the Portfolio Page
What good would a minimalistic freelance-style design be without the ability for someone to, well, showcase their work?
As I’ve been working on the new Minimum theme, it struck me (the pokes from people on Twitter helped as well) that I need to create a way for people to show off what they do.
Whether it be photos if they are a photographer or web designs if they are a developer, there should be a method for them to do this.
So I’d like to introduce the Portfolio page, which is built with Custom Post Types.
Here’s a screenshot of the Portfolio admin section:

The Gifts Keep on Coming
Not only are we planning on having the Portfolio capability included in the Minimum theme, I’m going to teach you how I added it to the theme as well.
Now isn’t that special? (said “The Church Lady” style.)
I do want to point out that this functionality will be served by way of a plugin that we’re going to release. This means you’ll be able to add a Portfolio page to any Genesis-powered website.
But in the meantime, here’s the layman’s way of doing it.
Adding a Portfolio Page
Open your child theme’s functions.php file and place the following code:
/** Create portfolio custom post type */
add_action( 'init', 'portfolio_post_type' );
function portfolio_post_type() {
register_post_type( 'portfolio',
array(
'labels' => array(
'name' => __( 'Portfolio' ),
'singular_name' => __( 'Portfolio' ),
),
'exclude_from_search' => true,
'has_archive' => true,
'hierarchical' => true,
'public' => true,
'rewrite' => array( 'slug' => 'portfolio' ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
)
);
}
This code registers the Portfolio custom post type, and sets up a number of arguments that we’ve used for the Minimum theme. (more on the register custom post type function)
Be sure to save your permalinks once you’ve added this code. Go to the Settings > Permalinks page in your WordPress dashboard and click the “save changes” button.
Now that you’ve got the Portfolio custom post type registered in your theme, you’ll want to create an archive-portfolio.php and a single-portfolio.php file.
These will output the “archive” page and the “single” page for the Portfolio custom post type.
Create a file called archive-portfolio.php file and place the following code:
<?php
/**
* 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' );
/** Remove the post info function */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
/** Remove the post content */
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
/** Add the featured image after post title */
add_action( 'genesis_post_title', 'minimum_portfolio_grid' );
function minimum_portfolio_grid() {
if ( has_post_thumbnail() ){
echo '<div class="portfolio-featured-image">';
echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
echo get_the_post_thumbnail($thumbnail->ID, 'portfolio');
echo '</a>';
echo '</div>';
}
}
/** Remove the post meta function */
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
genesis();
Please note that the Portfolio archive page will output the WordPress featured image, so when you upload a photo be sure to select that option. Otherwise your image won’t be displayed.
This means that you should register a featured image size in your child theme’s functions.php file by using the following code:
/** Add new image sizes */
add_image_size( 'portfolio', 330, 230, TRUE );
Now you’ll want to create a file called single-portfolio.php file and place the following code:
<?php
/**
* The custom portfolio post type single post template
*/
/** Force full width content layout */
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
/** Remove the post info function */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
/** Remove the author box on single posts */
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
/** Remove the post meta function */
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
/** Remove the comments template */
remove_action( 'genesis_after_post', 'genesis_get_comments_template' );
genesis();
Lastly, you will want to style a few pieces of the Portfolio archive and single pages. Here is the CSS that was used in the upcoming Minimum theme:
/* Portfolio
------------------------------------------------------------ */
.post-type-archive-portfolio .portfolio {
float: left;
margin: 0 15px 30px;
width: 340px;
}
.portfolio-featured-image a img {
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
border: 10px solid #f5f5f5;
transition: all 0.2s ease-in-out;
}
.portfolio-featured-image a img:hover{
border: 10px solid #ddd;
}
.single-portfolio #content {
text-align: center;
}
.single-portfolio img {
border: 20px solid #f5f5f5;
}
Keep in mind that this CSS was used based on the 1140px width of the Minimum theme. If your theme is only 960px wide, you’ll need to adjust the width in the CSS above accordingly.
And there you have it — that’s how you can showcase your work with a portfolio page for your Genesis-powered website. Pretty neat, huh?
Again, I want to mention that we’ll soon be releasing a plugin for this but I realize in the meantime some hardcore devs want granular control over things, so I spelled it all out here.
So what do you think? Can you see yourself using this? Is this something you’ve been waiting for us to build? Sound off in the comments below.
Thanks for sharing this Brian! Was waiting for it! And can’t wait more for Mimimum 2.0
Thumbs up for the nice work!
Thanks Puneet, appreciate it. The plugin will make it even easier, so that should be ready in a few days.
This looks great but can’t wait to try the plugin. Thanks very much for releasing it.
We actually might not release it by way of a plugin, because it’s so lightweight it might not make sense to do so. In other words, just adding the function to the functions.php file is all you need – so why bother with an extra plugin step?
I get that (and really appreciate the step by step here) but there are times when I don’t have complete control (when working with others etc) that having a plugin to keep the “chickens in line” as it were, would be very helpful. Hope you guys still consider it!
Looks good. A couple of points. Firstly is there a reason why you have not pre-fixed your custom post type? Also if it is not a plugin in the future, users would have to recode theirs child themes if they switch to anther theme. Would best be a plugin for me.
Hey Mark – sorry for the delay in response, your comment got marked as spam for some reason. There’s no reason we didn’t prefix the custom post type – I’m presuming you meant to personalize the function? As for a plugin – we decided against it, as the code used was so simple and didn’t think there’d even be a need to update it.
This makes every Genesis powered theme more useful. Keep up the good work!
Instead of hardcoding a width on there, you might try using the ‘post_class’ filter to apply Genesis Column Classes. That way they’ll always stack up regardless of site width, and if the site is responsive the portfolio will be too.
This would go in archive-portfolio.php: https://gist.github.com/2040968
More info: http://www.billerickson.net/a-better-and-easier-grid-loop/
Definitely something to consider Bill, thanks for taking the time to drop by. I’ll look into it and see what I can come up with!
This is great. I actually bought Minimum yesterday just so I could steal this code for my site…and then I found the instructions here.
Anyway, I’m having trouble with the grid (see http://www.aucoeurdesign.com/portfolio/ — there’s empty/open spaces) and I’m wondering if it’s because of the width and if I ought to try Bill’s code instead? I have a site that is 960 wide, plus I am leaving the sidebar on.
Sounds like I’m missing something here. Maybe because I’m not a coder. Where to put that ‘post_class’ in the code provided my Brian?
I wanna add portfolio and keep my theme responsive. I shall appreciate any help on this.
Awesome Brian is awesome.
A plugin for this kind of CPT? That would be great!
Yes, that is what is coming.
Brian,
Thank you for this. I appreciate that you guys are developing a plugin with this functionality, but I even more appreciate you taking the time to teach us how to do it ourselves!
Jonathan
You’re most certainly welcome Jonathan. I figure it doesn’t take much time for me to editorialize the process especially since I just went through it. And with our “functionality by way of plugin” approach we’ve been taking, it’s really easy to port it over as a plugin as well.
Now, that’s a post I’d like to read; porting it to a plugin!
Maybe another day.
Thanks again.
I am so excited for Minimum 2.0 and can’t wait to move my website over to this fantastic theme. Thank you for all your hard work!
Our pleasure – I can’t wait for the theme to be released either.
This is amazing! Thanks so much for putting this together Brian!
Very nice! Thanks so much! I’m always on the hunt for minimal and versatile portfolio solution. I will be using this asap and am looking forward to plugin and the new theme as well. I really like the direction you’re going design-wise.
We’re hoping to have the plugin out and available very soon!
Now that IS pretty special!!! And just when I was making plans to redo my portfolio page.
ooohh loving it already! I can’t wait until the full version is ready!
This is SO wonderful Brian. I’ve been waiting for this feature forever. Can this be done to ALL Studio Press themes? This is going to be SO wonderful for the wedding industry. Thanks for creating and sharing how to do it sooner. Of course I will be a fan of the plugin when released. Congratulations!
Yes, the plan is for the functionality to be made by way of the plugin. Granted, if you want to implement it you’ll need some CSS as well, which is why I posted this tutorial.
Silly question maybe but I noticed Minimum isn’t mobile responsive – I have read it’s good to have a mobile responsive site and want to start a new site off right – is Mobile responsive mainly for short business sites? Thanks – Heather
The current version of Minimum is not mobile responsive. However, when I’m done with the 2.0 version of it will be. As of right now, here’s a list of the responsive WordPress themes that we have.
thanks Brian – Heather
Thanks, Brian. I really appreciate these tutorials you keep throwing out to really educate rather than just a plugin (although, that’s awesome too). I’ll be spending the rest of my morning implementing this into my company’s site.
Brian,
I’ve been struggling trying to add the Genesis Responsive Slider to my page using Landscape which has no widgetized home areas or home.php. I don’t know CSS or WP-coding save for reverse-engineering some bits and pieces so I have been struggling with my child stylesheet, functions.php, etc. This tutorial will help me understand the bits of code I have been wrestling with for the past day or at least give me a way to post my photo portfolio in a different manner. Thanks and good timing.
Rob
You’ll need to add a widget area in order to use a slider widget.
We have tutes for that too.
Add a widget area:
http://www.studiopress.com/tutorials/register-widget-area
http://codex.wordpress.org/Widgetizing_Themes
Nick’s super clear explanation: http://nickc.co/sidebar
Using a hook:
http://www.briangardner.com/home-widget-area-eleven40/
Awesome explanation, You Rock! I have read a lot of different things about building the pages for archives-name.php and single-name.php, but I still don’t understand why some people write the file names like you did and others write archives_name.php and single_name.php. What I’ve heard is its better to write the file names with ( _ ) underscore. Is there a difference between using either way, and if so what is your take on it?
Thanks!
When you use the hyphenated version WordPress picks up the appended text by default. In other words when you use single-portfolio.php it automatically uses that template file for the single page for the portfolio custom post type.
So…where is your portfolio page? We want to see examples of this thing. I always loved “Show & Tell” in kindergarten.
PS: You can’t say that “StudioPress” is your portfolio. That’s cheating!
Thank you so much, this is great and helps me with a Genesis site I’m designing. One question, is it possible to define the featured image so the it’s not a fixed proportion, or crops the image? My goal is to have small images of the artwork display on the archive page that aren’t cropped and vary in proportion. (I’m learning as I go, and I obviously have a lot to learn.)
If you want the height to vary (as the width should be the same) you can register the featured image size like this:
That should give the page a more “Pinterest” look.
Thank you! I’ll give it a try.
Thanks a lot for this.
I’ve just been customising a current Genesis theme to include a portfolio custom post type as I update and convert my design portfolio over to WordPress. This woud have been usefull a few months back, never the less it’s great to be able to check code from the source to confirm I’m doing things correctly .
Many thanks and looking forward to the plug which might come in usefull for when I dont need granular control over everything as you put it.
Quick question…after creating the archive-portfolio.php and single-portfolio.php files, do we put them in the root directory of the child theme? I followed your tutorial to the letter, and for some reason I’m still not seeing my new pages when I create a new Portfolio post. I can only assume that I put them in the wrong directory.
Those files need to be put into the child theme’s root folder, yes. Also be sure to republish your permalinks once you’ve added the updated functions file as well.
Brian,
I actually made a thread on this a few months ago on the Genesis Forums about my best bet of displaying a portfolio. I struggled to find a functional solution, and acutally left the project alone for a few months; http://protechig.com/portfolio/ it’s about as basic as it gets. I’d like to be able to take your description a few steps further and instead of making it geared towards more of photography, gear it towards web design, but that’s all styling & custom fields.
Anyway, this is a really awesome thing, and I’ll be updating a few of my clients’ photoblog sites in the next few days to have it reflect the portfolio. I love your posts on custom post types, I have actually used them all the time since I found out about them from your site.
Thanks
Zach
Good to hear the tutorials on creating things with custom post types is helpful to folks!
I’ll be writing another basic on on how I built my Stream page with them possibly next week.
This is awesome Brian. I am waiting for Minimum 2.0 and I’ve decided to use it. Looks perfect!
We’ll hopefully be releasing it soon. Early next week possibly?
That’s perfect. Thank you.
It might be the first Norwegian blog with the minimum 2.0 theme
Thanks Brian, these how-to guides come in handy! Much appreciated.
Great – I expect to see something on your site that’s built from this within the next few days. Great new look, by the way!
Thanks man! I appreciate the feedback. I’ll keep you posted, but I definitely have something new in mind with this tutorial.
Appreciate the time and effort you put in to these coding posts Brian, I think it’s slowly sinking in.
If you spot the queue for people waiting for Minimum 2.0… that will be me at the front.
Portfolio plugin sounds like a great idea.
Just wanted to say thank you for taking the time to write this and looking forward to Minimum 2.0 and the plugin..
Thanks
Mike
You’re welcome Michael – though I will mention that the jury is still out in regards to the plugin. As mentioned earlier, it’s so lightweight that we might not even make it into a plugin.
No problem if not a plugin. Just have the above is good enough for me.
Thanks a lot Brian. Very usefull with all the new Genesis options.
I wonder if Genesis simple sidebars could work with archive-custom_post_type.php. I get this problem on a project.
I second this notion. I’d like to add a sidebar from Genesis Simple Sidebars to a CPT Archive page. Currently, the default is to include the primary sidebar. Here’s the CPT archive page: http://landlordology.com/tips/
Hi Brian,
The new plug-in will be great and the article is a truly great gift – many thanks have just saved lots of work for us. Cheers, the evolution of studiopress continues to be a great joy to watch and just when we start to think about a new wish list, it arrives like magic.
thank – great job once again.
Every day your awesomeness grows Sir Brian!
Hi Brian,
As always I am pleased and impressed by the knowledge you have and are willing to take the time to share.
One request from me…. Is it possible for you to show how individual portfolio items can be filtered via links?
Rafal Tomal achieves this effect nicely on his portfolio page
I have managed to filter my portfolio using a plugin on my website built on the genesis framework, but I am very interested to hear your thought on the best way to achieve this without a plugin.
Hey Jeremy – not quite sure what you mean by filtering by links – can you explain?
Hi There Jeremy,
Can you tell me what plugin you used to filter your portfolio. I’ve been searching all over for a plugin that will allow me to filter my portfolio into different categories.
Brian,
Do you have any suggestions on the best way to do this?
- Sarah
Hey Sarah – depends, first question is whether or not you’re using Genesis for your site. That’d make it much easier to explain.
Hi Brian,
I, too, am interested in using categories for my site’s Portfolio, but I am using the Balance theme (it seems similar?) with Genesis.
Is there a way to do that?
Thank you!
Steve
There is, but it’s pretty hard to describe in the comments how to do. The gist is that you need to make a custom taxonomy, and attach it to the custom post type.
Brian,
Love it! I run my main website on “Minimum” theme today.
With Minimum 2.0, I’ll probably put my personal site on there as well.
Thanks,
Craig
Great tutorial ! Thumb up..
Is there any way to add more portfolio archive page? I need to display more than one like Photo gallery, portfolio or clients like it show on studiopress’s showcase…
Thank in advance..
Supat
Brian,
I am using the Platinum them and I added the code, created the files, and uploaded them. In the admin area I have a new area under “Comments” called portfolio that lets me see existing and create new. When I “add” a new portfolio page, I lose/don’t get the functionality.
I don’t see anywhere on the new portfolio page where I can tell it what other categories/posts to pull into the new portfolio page like you would on the Crystal theme. I also don’t see any widgets to them, like on the Lifestyle theme. What am I missing to put this together?
The Lifestyle theme has a portfolio section that is completely different than what we have in store for the Minimum theme. All you’d need to do is add a new portfolio entry, upload an image and make sure you mark that as the featured image.
I have done all of those things. So, how do I get a collection of these portfolio images to show? I don’t mean to be dense (it just happens).
I am really eager to see Minimium 2.0
The theme looks great and moreover, it’s very suitable for minimalist blogs of mine.
Is there a simple way to limit the number of portfolio items on each page, similar to limiting the number of blog posts that show up per page?
Whoops, I got it. Sorry, silly question
Works thank you. It would be great if this could be made to create numerous portfolios for a site. Would that require taxonomies or something?
Beautiful theme Brian! Can’t wait to implement it soon.
Do you have a plugin or tutorial on how to add your Minimum 2.0 homepage Blog/Code/Stream/Theme icon buttons? They’re exactly what I’ve been struggling with on my current site.
Thank so much for your incredible design
There’s no tutorial on how to add them (yet), but when we update the Minimum theme we’ll have that functionality and show you how to do it.
Sounds great Brian.
Is there an ETA for Minimum 2.0? I know I’m not the only one eagerly anticipating this incredible redesign!
Brian,
Thanks so much for the tutorial. I have been wanting this feature for some time. I do have a question regarding implementation:
1. The Portfolio is a completely separate class to posts and pages, am I right? Is there any way to create a Portfolio page to highlight all the posts from a specific category? I imagine I would create a custom field, but would this work?
Thanks again for all of the great work from you and the StudioPress crew. I too would welcome a plugin form of this functionality.
Ian, the way this is right now – yes, it’s using a custom post type which uses a “portfolio” archive page. In order to do what you want, you’d have to enable custom taxonomies for the portfolio custom post type and then use taxonomy files in your theme to display for a specific “category”. (if that makes sense.)
I kind of understanding what you’re saying.
Is this functionality native to the code you’ve provided or should I wait for the plugin? Will it be available in the plugin? Is it obvious how to do this or can you please point me in the direction of another tutorial?
I’ve stumbled into this same problem. I enabled taxonomies but they archives for those are not displaying any results. Do I need to create new template pages for those?
You’ll need to create a taxonomy-custom.php file, where “custom” is the name of the taxonomy you enabled.
Brian,
It appears that there is a line forming like the release of a Harry Potter movie. Keep us posted!
I need some Minimum 2.0 in my life
Josh
Will the portfolio plugin work on lifestyles – http://cangomexico.com has been in the works for a year and I don’t want to change the format but it would be great if I could add a portfolio plugin – Heather
Hey Brian!
Thanks for this – your timing couldn’t have been more perfect. I’ve dropped this into a client site and am presenting very soon!! I would love to extend it a bit more: is there a way to create pagination between the posts? (on the actual post page – a button that says “next” or something to that effect)
Muchas muchas,
EE
Yes, in fact if you place the code below into your child theme’s functions.php file you’ll be able to specify how many posts to show on the portfolio archive page. If you have more posts than what you specify, the pagination will show by default.
Thanks for your quick response, Brian! This will certainly be helpful to add.
I was actually hoping to paginate within the single portfolio display so that when the user is looking at one portfolio post, they will have one click to get to the next post rather than back to the archive and then into the next post.
I keep thinking I should editing the single-portfolio.php template file…
Or, would adding something like ‘paged’ => $paged to the array in the functions file solve it?
Nm, this worked (added to functions.php) :
/**next previous post */
add_action(‘genesis_after_post_content’, ‘test_single_nav’, 20);
function test_single_nav() {
if( is_single() ) {
echo ”;
echo ”;
previous_post_link();
echo ”;
echo ”;
next_post_link();
echo ”;
echo ”;
}
}
-EE
answer found in the awesome StudioPress forum
Woohoo, glad to hear it!
Hello,
It appears the archive page doesn’t display the CPT archive title, ie. “Portfolio”. How could one add this?
Thanks,
Greg
Disregard please; wasn’t thinking clearly.
It happens.
Awesome!! I’ve been waiting for a simple portfolio solution without the need of an extra plugin.
Do you know if it’s possible to have an image overlay along with the border color change on hover?
Hey, love the new design! Just wanted to let you know that the link behind “Minimum 2.0 theme” doesn’t go to where you want it to.
Thanks so much Lindsey, and I’ve updated the link now that we have officially release the theme!
After loading all the code, its not exactly working correctly, so two questions:
1. Which permalinks setting do I choose? I have it set on Day and name
2. Is this a Page Template now? Should I have the option to set it as something other than Archive, Landing or Blog?
Any help appreciated, thank you!
Be sure to resave your permalinks after you add the code into the functions file. As for a page template, no it’s not – you’ll find the page on the yourdomain.com/portfolio/ path of your website.
Great news on the Portfolio Plugin, just what I have been looking for !
It’s great to read explanations like this one, Brian. I’m new to Genesis Framework and trying to figure out how it works to extend it with a custom child theme of my own.
I have followed the article BUT something happened, and I have no clue: in the portfolio.php it displays the same image twice; in the source code: first in a “portfolio-featured-image” div, and again in a “entry-content” div below. I have tried different sizes and things but I don’t understand what is happening (http://travel.lubalee.net/portfolio). Any idea, please? I’m lost!
Thank you very much for your time. You make a good job!
In your Genesis Theme Settings page, do you have your settings set to display a Featured Image in the Content Archives section?
Wow. Thanks a lot. It was just as you said!
Hey Brian – further to that question and your answer, what if you wanted to have a portfolio page with a single image and STILL wanted thumbnail images to display alongside excerpts in your content archives for categories?
Hi there! I had the exact same problem and this is how I fixed it, simple css. Now the thumbnail images display next to the blog posts but there are no second images under the thumbs in portfolio page. In the CSS that we added for the portfolio archive page add this:
.post-type-archive-portfolio .portfolio .entry-content{
display: none;
}
Thanks Brian for your dedicated work, i wish there were more people like you in the world. You are a beautiful person.
Hi, just did all that, as wanted to add a portfolio page to a Scribble-based site. All works fine but the portfolio page is not displaying anything.
I wanted something like the portfolio page in the Crystal child theme, and display posts filtered by category thanks to query_args.
Any clues ?
Thanks much,
Laura
This method is completely different than how we did it in Crystal, because we’re using custom post types and not typical WordPress posts.
Hi Brian, I think the link to the portfolio page leads to a 404:
http://demo.studiopress.com/minimum-two/portfolio/
Thanks, just updated the link.
Hi Brian (had Brain written there, initially
),
How do I show the comment box on the portfolio page? I keep getting the White Screen of Death, so obviously I am doing something wrong. Thanks! Julie
I deleted this line, with no change:
/** Remove the comments template */
remove_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ );
I must be missing something.
Where are you deleting that line?
Hi Brian,
Could this be done in custom_functions.php? Should functions.php be left in tact in the Lifestyle child theme. I’m just starting out with function and css customizations and I want to make sure I don’t overwrite anything.
I wouldn’t use a custom_functions file – rather use the functions.php file that is in the Lifestyle child theme. That’s what it’s for – for customizations!
ahhh…I created page and resolved my query from comments….Brian _Many many thanks for that…..
I am following nick la for long time and his blog named web designer wall…Actually he have created a post about adding some design elements to the portfolio page and I loved it but while following that post something is going wrong and I an unable to implement code into my eleven40 child theme….
Here’s article link :- http://webdesignerwall.com/tutorials/decorative-css-gallery-part-2
Brian. how can i filter the post title on this page? say for using jquery mosaic where i’m going to need to add div or two in or around the post title to make it work.
your help and support is appreciated.
Thank you for the tutorial. Very helpfull
I have just one question. when I add the pages to my theme (enterprise) ..and try to use the featured post widget.. I can not get the post to show up..Tried everything but the area keeps blank.
In the admin adres now is an extra option portfolio and I can add new content in there.. but I can not select these in the futured post widet since my theme does not know them..
There is no option on the portfolio page to link it to an categorie or post to use the porftolio page to the widget area.
Can you please help me.. my site is almost done and about to get launced but I want to have the portfolio in this theme.. (because this theme is so easy to modify)
THanks
The featured post widget does not show custom post types, but you can use the ‘featured post widget amplified’ plugin. works a treat. (it uses different class names, so add these to your stylesheet too)
Thank you so much. THis was just what I was looking for. It is working like a charm now..
(just did a happy dance after spending so many wasted hours trying to find a solution. You really made my day !!
Thank you so much !!
That’s amazing! Is there any way to sort the output to be alphabetical on the archive-cpt.php page?
Hmm, went over to nickthegeek’s page, picked up some code, went to WordPress and got the wp_parse_args I needed. It works great:
I am developing a site using the Balance theme which seems to use the same Portfolio as the Minimum theme. It would be great if I could have subcategories for the Portfolio.
In the example you provided, the photographer might have more than one photo for each location – Antarctica, etc. (and probably would!). Clicking on the Antarctica link could bring the visitor to another page with another grid of just Antarctica photos with captions.
Maybe clicking on those photos could bring the visitor to one page with that photo + details.
Can the Portfolio be modified to accomplish that?
It can, but you’d need to create custom taxonomies for this.
Thanks for this!
The Portfolio post type nicely appears in my menu and I can create Portfolio items. Unfortunately, after publishing, I get a 404 page.
Anyone got an idea what’s going on?
Thanks!
Mark
Be sure to resave your custom permalinks.
Hello Brian,
Awesome snippet! I was wondering why you gave your permission rights to some one unknown
http://icustomizethesis.com/2012/10/thesis-eleven40-responsive-thesis-2-0-skin/
They copied it? :O
Hi Brian, love the theme, just bought it, but I would like to know which child theme do you use for this site?
Thanks for creating amazing stuff!!
Ok, I kinda a get it, so I only install the genesis framework and then I copy and paste all the codes to the css and all that stuff in my site’s code?
Brian, never mind, just figured out, had not seen the zip button, first time using github. Will signing up and following you as well. Once again, your work is awesome, this is what web design is supposed to be like.
Glad you got it worked out. GitHub takes a bit of time to get used to and understand — I know it did for me.
Fantastic post, just what I’m looking for.
I’ve run into a problem when viewing the ‘single’ page though. The image isn’t appearing, everything else is though.
I’m using the Dynamik Framework for Genesis though, I don’t know if that would make a difference?
Probably best to hit up Eric Hamm over at Dynamik and ask him — since we didn’t develop that.
I’m attempting to follow the thread.. but do you offer a plugin for this? I’m afraid I may miss one part of code I need to include?
thanks!
Unfortunately we don’t offer one, but our friends at WebDevStudios created something that might work.
Thanks for the instructions Brian.
I am using your super fast awesome synthesis hosting and “Balance” theme.
How do I access my theme’s root folder to upload the archive-portfolio.php and a single-portfolio.php file? Do I have ftp access? Didn’t need it until now.
And… can I just make these files in my text editor?
Signed,
Semi-Novice.
Thanks!!
Hey Jamie — yes, if you want to upload files to your theme, you’ll need to do that through FTP. You should have access inside your Synthesis account for your account details which would give you the login info for that.
Mr. Brian, I have tried to add the code in Metro Theme but it’s not responsive at all.
As we are now in responsive websites world, would you mind updating the code to make it responsive? At least for guys like us who can’t code!
I’m looking forward for your kind consideration. As I just mentioned, I’m using Metro Theme so any regard to that shall greatly be appreciated, Sir
Hello!
actually i have used this code but my problem is not resolved.
my site has genesis framework and a child theme. i want to show specific category posts on my home page content area. i used the simple post query
query_posts(‘post_status=publish&cat=33&wp_get_recent_posts()’);
in my genesis/lib/structure/loops.php file right above the do_action( ‘genesis_before_post’ );
but it makes no sense .
so at last i used this grid loop but using this i am still unable to show category specefic posts on home page as it is not taking the category attribute.
can u help me that how can i show specific category posts on my home page .
the main problem is this : by clicking on a particular post link the post doesn’t open on a saparate page it redirects to the same page.
can anyone help me regarding this???
Hi Brian, I was wondering if it is possible to display the portfolio archive below on the single post page. So that the portfolio archive is always visible below on the single portfolio post page. If so, would you kindly explain to me how i can make this work. Thanks!
This is kind of a loaded question, as this would have to include registering a widget area, and building a custom loop to pull in the Portfolio posts.
Thanks for your response, Registering a widget area wouldn’t be a problem. The custom look however. Is that something you could help me with? Thanks
I meant custom LOOP and not look lol
Works brilliantly with the Metro child Theme (with some minor CSS tweaks).
Thank you!!!
Hi Brian,
Awesome! Thanks for the breakdown. However, you mentioned a plugin to accomplish this. Did the plugin ever materialize? if so, what is called?
Thanks!
Theresa
still works like a charm.. but is it possible to remove the item title at the archive page.
I do not like the titles above my archive page.. and want to show only images..
How can I do that ?
Thank you.
already found the trick.. just needed to add an extra php string
/** Remove page titles site wide (posts & pages) */
remove_action(‘genesis_post_title’, ‘genesis_do_post_title’);
I only want to show the sidebar on this page.. is this possible and how do I need to do this ?
Thank you
Add your:
/* Remove page titles
———————————————————— */
remove_action(‘genesis_post_title’, ‘genesis_do_post_title’);
to the archive-portfolio.php page, not the function.php , this way it’s only removing page titles on that portfolio page.
to force full width layout in the archive-portfolio.php, you add:
/* Force full width content layout
———————————————————— */
add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );