- This topic is empty.
June 4, 2012 at 8:24 am #38342
I’m not sure the right way to go about this or how to go about this in WordPress. Essentially what I want to do is have a Portfolio page that has both Lettering and Typography pieces of my work.
Now, when you click on any one of these images, it will bring you to their specific page. The link would look something like this:
not this: mydomain.com/portfolio/lettering/title-1
Along with that, I need that page to have a large image with 3 thumbnail images for process shots. When you click on any of those 3 thumbnails, that large image should change accordingly. Make sense?
Here is a visual
I’m not sure if I need a custom post type or exactly how to go about this. Any ideas?June 4, 2012 at 1:30 pm #103871
I would go with custom post types for sure. If you create two types of custom posts (one called “lettering” and one called “typography”), the links would definitely be like this:
Your portfolio page can be created so that it just lists posts from those custom post types.
Personally, I like the plugin “Custom Post Type UI”, which lets you create custom post types very easily. If you want, you can have both types to use different templates too. Normally, a custom post type will just use the default archive.php and single.php as their templates. However when you just drop archive-lettering.php and single-lettering.php in your directory, WordPress will use those files for those types, so you can customize the templates for those.June 4, 2012 at 9:40 pm #103892
@senf Thank you! I’m going to take a look at that and see what I can come up with. I really appreciate itJune 4, 2012 at 10:56 pm #103896
@senf Wait, how do I attach the custom post types to my Portfolio page I created in the backend?
Edit: Or what I mean is, how can I add the content from both custom post types to my Portfolio page? I would prefer that they’re not separated content. Meaning, if I add something to Typography, it will show up right next to a Lettering piece. Example show above with thumbnails.June 5, 2012 at 12:45 am #103900
@jknetdesign Mind cleaning that post up a little so I can read it better? Just throw your code between the pre, code tags like this:
Put code here code> pre>June 5, 2012 at 7:11 am #103905
All right. I figured everything out except one thing. Thanks @senff
How can I add ALL post_thumbnails from both Custom Post Types into my Portfolio template/page?June 5, 2012 at 9:12 am #103907
I think you can do a query to show only posts from those two types (if that’s what you meant):
query_posts( array( 'post_type' => array( 'lettering', 'typography'), 'posts_per_page' => -1) );
while ( have_posts() ) : the_post();
echo ''; // [OR WHATEVER YOU WANT TO PLACE HERE FOR EACH POST]
June 5, 2012 at 9:16 am #103908
I ended up using the code below. I appreciate all your help, man.
$loop = new WP_Query( array( 'post_type' => array('lettering', 'typography')&'post_status=publish'));
while ( $loop->have_posts() ) : $loop->the_post();
June 5, 2012 at 9:31 am #103909
@christopherburton Damn man, there’s TWO f’s in my name!!! You keep making the same mistake! ;)June 5, 2012 at 9:39 am #103910
I put this together fairly quickly, I’m sure the script can be done better, but it’s a start: http://jsfiddle.net/senff/9Xwhj/June 5, 2012 at 10:39 am #103914
- The forum ‘Other’ is closed to new topics and replies.