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

Peter Cusack
Peter Cusack
2,622 Points

Linking pages while converting a site into a Wordpress site

I am going through the "Wordpress Theme Development" course and trying to apply it to my own project. It is difficult because I am not trying to turn my website into a theme where users can continue to add content. I just want to make my website into a Wordpress site solely for the purpose of getting access to some of the plugins. So my question is, is there a simple way to link pages in Wordpress without making every page into custom post types. When I try to add a link in the php file to another php file using href='whatever.php' . I get an error saying that the page was not found on the server.

2 Answers

Jordan Jesse
Jordan Jesse
13,243 Points

Hi Peter,

Have you tried using the WordPress function get_template_part()? It works as an "include" for WordPress that allows you to pull other .php template files into your working file.

Peter Cusack
Peter Cusack
2,622 Points

Hey thanks for the help but I think I'm going to try another rout of doing this without Wordpress. I'm pretty sure I was using Wordpress in the wrong way. Thanks though

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hey Peter, I think you maybe are making the right call here with what you're going for. There are ways to work just bits and pieces of WordPress into a site, but it usually takes some understanding of building a number of sites with WordPress in its more traditional full site application before you can see how to pull in little bits and pieces of it that you need. Good luck though!