• In page attributes, there is an option called “Default Template.” All my pages, other than my homepage, is set to this template.

    I wanted to edit it, so that only the sidebars will appear on the front page. Then thing is, there is no .php for this template! I can’t find it anywhere!

    Would it be in another place? How would I go about finding it? I would create another page template, but I don’t know php really well, and would prefer to work off of already established code.

    My website is https://www.dipunchurface.com My theme is inkblot.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Template’s name depends on the Theme. You can create a custom Template instead and use it as per your need.

    Here is the guide : https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_Templates

    <?php
    /*
    Template Name: This Name Will Appear As Template Name
    */
    ?>

    The next line :

    <?php get_header(); ?>

    is for header. In this way.

    Thread Starter ndipunchurface

    (@ndipunchurface)

    I appreciate that, but where else do I go from there?

    Like I said, I have no .php experience. I have the header, the footer, and the template name. The rest is blank.

    What code do I use to make the content appear on a custom page template?

    I have no idea even where to begin.

    Seems like you need to invest a few hours in learning the developer’s side of WordPress. Here’s a tutorial that brought me up to speed in a few hours. It will give you the basics of the template structure in WordPress and it’s coding:

    here

    After you’ve followed a tutorial on templates, have a look at this link, it’s the template file hierarchy for WordPress themes. It’ll help you understand why pages/posts revert to the default template and how to make theme changes specific to post types and categories.

    Good luck!

    Rest is blank because there will be the things you want to put. What you want to put there ?

    What is the name of the Theme (url) by the way, some premium themes removes some hooks.

    Thread Starter ndipunchurface

    (@ndipunchurface)

    Thank you for the link patv. I suppose I’ll learn how to do all that.

    Abhishek Ghosh, the url is right here: https://webcomicms.net/. I think I’m going to learn how to create a custom with the tutorial posted. I just find it weird that theres a default template in the theme with no editable .php

    The no editable default template you’re talking about is WordPress’ fail-safe template. This is used when no custom template is defined in your custom theme (as you’ll see in the tutorial.

    Once you read abit through the tutorial, you’ll understand that you need to modify the page.php template file to modify the default template style for pages. For posts, it’s single.php.

    Thread Starter ndipunchurface

    (@ndipunchurface)

    There is no page.php, or anything similar to it… A lot of tutorials, except the one you gave me, only teach you how to edit a code that’s already there. I can’t use any of them, because my theme literally has no page.php.

    That’s okay. Guess I’m learning php

    I promise you’re best off spending your time learning abit of PHP than spending your time asking questions around the support site. AS I remember, the tutorial i sent you is pretty entry-level in that it’ll help you learn PHP at the same time.

    A good reference point for PHP is this site I always refer myself to. This might help you out aswell.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Missing .php file for Page Template?’ is closed to new replies.