WordPress.org

Support

Support » Themes and Templates » Template within a Template?

Template within a Template?

  • dodgersandstorm
    Member

    @dodgersandstorm

    I’m working on a webpage where I will have multiple pages (http://squarecouture.com) and they are all supposed to match. Each one will be a store profile that will look something like this:

    Store Hours: 3:00-4:00
    Store Location: 1881 Soandso St.

    I am trying to make sure that if I want to change it (make the first part bold instead of italics, for instance) I won’t have to go through each individual to page. Is there a way to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @mercime
    Participant

    @mercime

    Create a PHP file say, profile.php and put in the Store Hours and Store Location info and html and upload it to your theme folder.

    You can insert profile.php into the area where you want it by adding the code below to page.php or custompage.php
    <?php include(TEMPLATEPATH."/profile.php");?>
    Good luck.

    dodgersandstorm
    Member

    @dodgersandstorm

    That would make it so that I could change the style of every label (Store Hours:, etc.) on every page at once?

    @mercime
    Participant

    @mercime

    Yes. You can:
    1) change info in profile.php and all the pages with that included will just info at same time (clear your cache to make sure you’re seeing the updated page)
    2) change the style in style.css for the div/span ID or class you set up for the info in profile.php and it will affect all pages with profile.php included (clear cache, can’t say it often enough)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Template within a Template?’ is closed to new replies.