• So I’m diving into page templates…

    I read up on them and I love the concept behind them…
    1 question:

    Can I hard code more than is necessary?

    I have 2 different header.php pages and I can eliminate 2 by hard coding the info directly into the page template… if it’s possible.
    Is this good coding? Will it work? Anyone’s thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can code pretty much anything you want into the page template files including “hard coding” the header section.

    There are other ways that may prove more useful such as using the get_header() function to call a specific header file, such as:

    <?php get_header('home'); ?>

    … to call the header-home.php file

    See this article for more information: https://codex.www.ads-software.com/Function_Reference/get_header

    Hope that gives you some ideas …

    Thread Starter hoss9009

    (@hoss9009)

    @cais… maybe you can help a bro out…

    I have a my front page of my site as a static page (with a template assigned to it), and I have another page (with another template assigned to it) for my blogs.

    For some reason, EVERY page has sample posts on them.

    Why is this?

    link

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘page template construction’ is closed to new replies.