Reputation: 389
I'm having trouble with Wordpress. The homepage of the site I want to do has a menu and a link called "articles" in it. My problem is that I don't know where should "articles" link to.
On my homepage, which is using the template front-page.php
, there is a slider that shows the recent posts. I'm using The Loop to get the posts and display them. Then there's the template for the "articles" page which must also list the recent posts, but using a different layout. I already coded all the HTML and included The Loop, but I don't know how to display that page in Wordpress.
For example, I tried to name the file home.php
and then pointed my link to it. But when the page loads, it throws an error, Call to undefined function get_header()
, as if Wordpress functions weren't loaded. I guess they weren't really loaded, but why? The file is inside my themes directory, why doesn't my approach work?
Upvotes: 0
Views: 2113
Reputation: 1987
The steps would be like this :-
Follow the above steps like this you can assign custom codes and assign it to a page. FYI here are the links of template creation tutorials.
EDIT: Forgot to place the tutorial links
Upvotes: 1