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 How to Make a Website with WordPress Custom Post Types and Fields in WordPress Custom Post Type Templates

404 error when clicking on examples from My Art page.

My page looks like what the tutorial looks like but when I click on any of the example art posts on the My Art page I get a "Page not found " error.

It seems like the single-art.php is not working.

Thanks for any help.

9 Answers

Solution ! :0 Hi! Hope it's not too late! But, I had the same issue.

I'm using GoDaddys Web Ultimate Windows Plesk Hosting and the same TwentyThirteen-Child Theme.

After many frustrated trials & attempts and even "eating watermellone" :) Really! It's watermelon - anyways! , I was amazed when I came across the simple solution of just deactivating the Custom Post Type UI and Advanced Custom Fields plugins "at the same time" and then reactivating them "at the same time". And that's just how I did it and "it worked for me".

Good luck & Hope this helps!

Great tip - it worked for me. Thanks for saving me hours of agony!

Thanks for your help. I have abandoned Wordpress Development for now and moved over to the Front End Web Development Track to learn HTML and CSS. After I complete it I'll go back to Wordpress. I'll try your solution when I come back.

Thanks for reviving this thread. Your solution already helped another person!

HUE HUE HUE.

Chris Raedeke
Chris Raedeke
434 Points

Thanks! This got it working for me.

Worked for me, does anyone know why? Now I'm going to start debugging everything by turning it off and on again haha..

Had the exact same problem, and this solution worked perfectly for me. No idea why. Thanks for the help!

Rob Axelsen
Rob Axelsen
4,082 Points

Worked for me too! Thanks a lot.

Elena Paraschiv
Elena Paraschiv
9,938 Points

Worked for me too. Thanks Francisco! Does anyone understand why this problem appears and why it is solved in this way?

Scott Cox
Scott Cox
12,219 Points

This didn't work for me, but changing my Settings -> Permalinks setting back to the default seemed to do the trick! If I figure out why, I'll let you know :)

Meg Cusack
Meg Cusack
11,448 Points

Thanks so much, Francisco. This worked for me too!

Danny Luna
Danny Luna
5,899 Points

Good stuff, worked like a charm!!

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Couple things:

  1. What happens when you remove the single-art.php template and try to view the page?
  2. What happens when you open the post from the admin area and click to view it from there?

404 error on both 1 and 2.

I'm going to go through the tutorial again. Maybe I changed some code without realizing it.

Thanks for getting back to me though.

I went through the tutorial again and still haven't figured out what happened.

I'm working locally with XAMPP. Here are the url's of the pages of my site.

Home: http://localhost/wordpress/ My Art: http://localhost/wordpress/my-art/ Example 1 (404 error page): http://localhost/wordpress/blog/art/example-1/

It's the "blog" part of the Example 1 url that concerns me. I don't have any pages named blog for my site. Also, the plugins used look different since the video was made. Maybe there are more options to click with the new versions?

try eating watermellone, it really works!

try eating watermellone

I was having the same problem (404 error) , except I'm running WP on my Mac using MAMP, so I tried Francisco Cruz's suggestion and it worked.

Ken Galvin
Ken Galvin
5,101 Points

Thank you so much for the solution, i got so confused when I got the 404 error.

Ken Galvin
Ken Galvin
5,101 Points

Thank you so much for the solution, i got so confused when I got the 404 error.

Michael Barrish
Michael Barrish
2,820 Points

This solved it for me, but I'd like to understand why -- both why the problem occurs and why the solution works. I'd also like to know if this sort of issue is common to WP. or if it's limited to using the two plugins together.

Oda Åberg
Oda Åberg
858 Points

Thank You!!!