0

I'm trying to put up a custom theme on top of the 2015 Wordpress default theme.

I've carefully followed instructions on a couple of websites. That is:

When I go to that page, it's specific contents don't appear no matter how I modify seoContent.php file. The page always displays the same index page (page.php contents in the root dir, I assume). Why? Is this some fallback with an if condition?

It doesn't even if I go to /wp_project_name/index.php/seoContent.php to see the new page. Why?

Any kind of help or hints much appreciated!

EDIT_1: The project is on WAMP's localhost.

1 Answer 1

1

I would try this: open your current theme directory root folder and open the page.php file and save as page-SeoContent.php. Replace the comment area at the top - should look something like: /** * The template for displaying pages * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages and that * other "pages" on your WordPress site will use a different template. * * @package WordPress * @subpackage Twenty_Sixteen * @since Twenty Sixteen 1.0 */

with the template name from your attached sample: /* Template Name: SEO-Content-page */ Then copy everything between <!--- SMO TABLE ---> and <!--- CLOSE SMO TABLE ---> from your sample and paste into your new page-SeoContent.php file. You're content here is straight html so make sure you don't copy it into a php section. That should do it. FYI what you're trying to do create a new template, not a new theme. This should at least make it easier to track down any other issues.

1
  • Thanks for the answer. I've decided to setup WP on a server using Installatron and the custom pages are now showing up as they're supposed to. No idea what causes them to spit out the same index template on localhost. If there'd be something wrong with the database, perhaps it wouldn't load the index content at all. However, even custom HTML don't appear in custom PHP page file in the root dir. However, as I mentioned, all good on the server. Mar 25, 2016 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.