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 Customizing WordPress Themes Customizing WordPress Theme Files

Florian Goussin
Florian Goussin
8,925 Points

page.php

Moving page.php to via ftp don't delete the comment. I tried then to delete everything inside the article tag and everything was still here!

I reviewed the video and it seems I followed each step like copy the page.php from the parent theme to the child theme and then move it via ftp.

It worked perfectly for the styles however.

6 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

When you go into Appearance > Editor and view the page.php file, does it show comment form commented out? This would determine if the file is actually uploaded and being referenced.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hey,

Can you post up the following please:

  1. A screenshot showing the page.php file inside the child theme folder in your FTP client
  2. The code in your page.php file
  3. A link so we can test.

Thanks!

Florian Goussin
Florian Goussin
8,925 Points

There is also something weird with http://zahramarwan.com because it goes directly to webhostingforstudent.com. I guess it must be something in cpanel to change that.

Florian Goussin
Florian Goussin
8,925 Points

I fixed this problem by adding the following lines to my config file:

define('WP_HOME', 'zahramarwan.com'); define('WP_SITEURL', 'zahramarwan.com');

I still have the first problem.

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

It may have actually just been showing the welcome.html page, which you can remove or add an index.php or index.html to overwrite.

Florian Goussin
Florian Goussin
8,925 Points

Yes: <?php //comments_template(); ?> under Twenty Thirteen Child: Page Template (page.php)

Florian Goussin
Florian Goussin
8,925 Points

Hum, after reviewing the video again it seems that I hadn't grasped the sentence: "page as opposed to a post".

Indeed I was checking a post and not a page.

if I opened a page like http://zahramarwan.com/?page_id=25 there is no comment anymore. I uncommented the code in page.php but nothing changed in this page: http://zahramarwan.com/?page_id=25 I think it's because http://zahramarwan.com/?page_id=25 is a Custom Post Type that's to say a post. If it's right, the URL is a bit confusing from my opinion.

To test the comments properly I have created a dummy page: http://zahramarwan.com/?page_id=39 and this time it is working properly!

Thanks a lot from the advices and I glad I can edit the theme pages directly from the online Dashboard.