Reputation: 463
I am using twenty eleven for my theme and I create a PHP page under it named results.php in the results.php here's my code:
<?php
get_header(); ?>
<?php get_footer(); ?>
From my index.php:
<?php get_header(); ?>
<a href="wp-content/themes/twentyeleven/result.php">Main</a>
<?php get_footer(); ?>
Upvotes: 1
Views: 2632
Reputation: 9782
If you are making a custom page on the wordpress,
Then you have to set the template name into your file like in your result.php
:
<?php
/* Template Name: Result */
get_header();
// Rest Stuff for result.php
get_footer();
?>
hope this will solve your problem..
UPDATE: Please don't use the direct link that you are given in your index.php file something like
<a href="wp-content/themes/twentyeleven/result.php">Main</a>
Because you are calling directly to the result.php
but the best way is to create a page with the name Main
from the backend and select the Result
theme for that particular page.
Upvotes: 1