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

Patrick Hays
Patrick Hays
975 Points

Templates breaking styles

I am working with custom post types. I have uploaded the download .php files and uploaded them to my theme folder. When i create a new page for my 'Art Gallery' I am getting a full width page, no padding and no gallery

Are you going off of the tutorial here at treehouse, or are you using a different theme?

Patrick Hays
Patrick Hays
975 Points

Well since then I did figure out that I need to be using Twenty-thirteen theme. Now my challenge is images not showing,,, Here is the url: https://pathaysonline.com/my-art-gallery
BTW, I am using twenty thirteen child blue from the WP repository. Thanks Pat

3 Answers

Without seeing the code is difficult to say it looks like your returning an array of data. Try using a basic call https://www.advancedcustomfields.com/resources/image/ at the bottom and just return the URL of the image.

Yeah Nick Petersen is correct, as of right now your images have a console error of 404. There are ever ways to about this, Nick recommendation is solid. you also should rename your images, It should be something short and with no spaces. If you are pulling in posts, you can set each image as the featured image for the corresponding post and call the image with the post_thumbnail function,

Patrick Hays
Patrick Hays
975 Points

Thanks both of you for responding, I am using 2 plugins and following instructions in the "Build a website with WordPress" course 'Custom Post Types and Fields in WordPress' area. The plugins I am using are Custom Posts Type UI and Custom Field, both from the WordPress Plugin repository. I am using Twentythirteen theme with Twentythirteen child-blue as a child theme. The location of the images that are not showing are; https://pathaysonline.com/wp-content/uploads/2017/03/siren.gif and https://pathaysonline.com/wp-content/uploads/2017/03/seamus.jpg

Nick Peterson said " it looks like your returning an array of data"
This is the locaction according to the pageof the second image; https://pathaysonline.com/my-art-gallery/34,%20,%20seamus,%20,%20,%20image/jpeg,%20https://pathaysonline.com/wp-content/uploads/2017/03/seamus.jpg,%20300,%20168,%20Array

I was just following instructions, I even went back several times to see what I might be missing. I don't remember now but I don't think I did any file editing in custom.php

This is not urgent as I have moved on to more WordPress development courses. But I sure would like to know,

Thanks guys Pat