Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Documentation for creating a theme?
#4
Basic sample GS template with most common functions (in bold)

<?php if(!defined('IN_GS')){ die('you cannot load this page directly.');} ?>
<html>
<head>
<title>
<?php get_page_clean_title(); ?>
|
<?php get_site_name(); ?>,
<?php get_component('tagline'); ?>

</title>
<?php get_header(); ?><!-- some meta tags -->
<link rel="stylesheet" type="text/css" href="<?php get_theme_url(); ?>/default.css" media="all" />
</head>
<body>
<div id="header">
<a href="<?php get_site_url(); ?>"><?php get_site_name(); ?></a>
<p id="description"><?php get_component('tagline'); ?></p>
</div>
<div id="nav">
<?php get_navigation(return_page_slug()); ?>
</div>
<div id="bodycontent">
<div class="post">
<h1><?php get_page_title(); ?></h1>
<div class="postcontent">
<?php get_page_content(); ?>
</div>
</div>
</div>
<div id="footer">
<?php get_site_credits(); ?>
<?php get_footer(); ?>

</div>
</body>
</html>

(Don't use it as a base for creating other templates -- better use the Default GetSimple theme.
This can be useful as a tutorial :-) , for copy-pasting functions on an existing html page to "port" it to GS.)

Edit: I've inserted the first line (in red) that will avoid direct access to the template file. It is very recommended to prevent server path disclosure.
Reply


Messages In This Thread
Documentation for creating a theme? - by baris - 2010-03-15, 10:40:52
Documentation for creating a theme? - by ccagle8 - 2010-03-15, 20:30:59
Documentation for creating a theme? - by Carlos - 2010-03-16, 02:31:54
Documentation for creating a theme? - by ccagle8 - 2010-03-16, 12:29:08
Documentation for creating a theme? - by baris - 2010-03-16, 13:46:00



Users browsing this thread: 1 Guest(s)