Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Custom Post Type Templates in WordPress The Portfolio Homepage

shareyourpeace
shareyourpeace
3,244 Points

There is a pause while Zac adds more images. My output does not show my images.

Can you provide 'step by step' instructions to add these images.

My output had many alt=' ' on the page.

I think this is what I did.

''' Portfolio > add portfolio piece > title and add media > publish. '''

Thanks.

shareyourpeace
shareyourpeace
3,244 Points

What I did later was this.

Navigate to the portfolio page.

Toolbar > edit page > add media (here).

Note. I had to make certain to click behind the image to insert the next image where I wanted

You may want to click return so that they line up one on top of the other.

To format, this is kind of an odd way to get in.

--navigate to the portfolio page --top toolbar > edit page --add media --(you will see all of your images) --select each image. --in the right side bar scroll down to see the alignment box. -- choose how you want to align the image.

I centered my images one under the other.

But when I click on these images, -- I JUST come to a page where the image is small and in the top left corner of the window. I do not see the caption.

Any ideas ?

6 Answers

Phil Purves
Phil Purves
9,827 Points

You'd just need to select the wordpress category on the forums section and scroll down through the last few days of Questions to find my Q's and A's. It would be great if this site offered numbering or direct means of linking/referencing.

Yeah the Portfolio Pieces are the custom posts. You can add a bunch of images to each one but be sure to add a 'feature image' too. The feature image is also the 'thumbnail' and these what will appear on the grid of the Portfolio Page (one for each post - it acts as a link), That page is kind of the overview or menu for all your custom posts. But the course gets a bit hard to follow at that stage - only getting into the single-portfolio templates after showing what looks like a completed overview page. You won't see that array of images (looking as it should) until you've made at least 4 custom posts (each with a thumbnail or featured image).

Hope that helps and that you can figure it out. Don't think I can explain it any better. I had to leap forwards and backwards around that section before 'getting it'.

shareyourpeace
shareyourpeace
3,244 Points

Thanks Phillip. I am still working through it.

shareyourpeace
shareyourpeace
3,244 Points

Resolved.

Phillip, thank you. I wonder if I should rephrase my question and make it shorter.

Summarized. You have a 'portfolio'. Inside of the 'portfolio' you have 'portfolio pieces'. Each portfolio piece is consider a 'custom post'.

Edit each 'portfolio piece' and make certain that you select a 'featured image' (thumbnail in the php). This featured image will show up on the 'portfolio page' And if you click the featured image from the portfolio page, it will bring you to the 'portfolio piece'

This worked just fine.

Still have some formatting problems that I will work on. Went to the next video and the next and previous work but 'back to portfolio' needs work :) Thanks again.

Aaron Jackson
Aaron Jackson
5,644 Points

Have you set featured image for the Portfolio post? That could be why you aren't seeing the images, if everything is coded correctly.

shareyourpeace
shareyourpeace
3,244 Points

Hi, thanks for responding. Yes, my featured image is showing. See my response below which is a continuation.

Phil Purves
Phil Purves
9,827 Points

Hi - I got stuck there too. It's the most complicated part of the course. See my Question from two days ago - the answers may help. N.B. you only add media to the custom posts and not the main portfolio page. The code (for that page) uses a loop to pull a featured image from each post (see Aaron's point above) to make up the grid style display. Good luck!

shareyourpeace
shareyourpeace
3,244 Points

"You only add media to the 'custom posts' and not the main portfolio page. " You are correct. I had added the media to the portfolio page. But that is what Zac did - yes ?

How did Zac get all of those shape images to show up on the Portfolio Page ?

What would be considered the 'custom posts' ? Is 'portfolio piece' the 'custom posts' page ? post?

I just did this: portfolio > add portfolio piece > title, description, add media. I created 4 portfolio pieces with title, desc, image. When I view the portfolio piece from dashboard, I do see the the title but 'no' image. I think that is the next video.

I will update this. thanks.

Oh, I didn't know where to find your post from 2 days ago.

Phil Purves
Phil Purves
9,827 Points

Sounds like you're nearly there. Don't forget to add Feature Image on each Portfolio Piece - You'll find that option down the Right Hand side when editing those... then Update before continuing.

shareyourpeace
shareyourpeace
3,244 Points

Working on it. I just read your referenced post from above and add a comment about how to include code. thanks.

Achilles The Great
PLUS
Achilles The Great
Courses Plus Student 5,379 Points

Hi!, I have some issues with that page as well, all the images are shown correct, but when I click at one of the images and takes me to the next page i don't see any content? Not title or image, but I do get the right url

Achilles The Great I have the same issue have you had an opportunity to figure it out yet?