I'm trying to add a custom page template to show only one sidebar for specific pages.
I created a template page in thesis folder and I put these lines
<?php echo thesis_header(); ?>
<?php echo thesis_nav_menu(); ?>
<div id="custom-page">
<div class="content-column">
<?php echo thesis_content(); ?>
</div>
<div class="sidebars">
<?php echo thesis_sidebar_1(); ?>
</div>
</div>
<?php echo thesis_footer_area(); ?>
I found this code in a tutorial but when I open any page with this template, page doesnt show up correctly. Because all < head>< /head> section is missing. thesis_header() function doesnt bring html page's section.
My question; how can I add all those section just like thesis_html_framework() does?
thanks..
I could not found a reasonable method and I decided to modify structure with jQuery. This is the custom template file to show only one sidebar. I know not perfect solution, but it saved the day.
<?php
/**
* Template Name: Custom - One Sidebar Template
*
* A custom template for use with Thesis theme for creating pages that add a left sidebar.
* DO NOT EDIT THIS FILE. Instead, use the thesis_hook_custom_template() hook in custom/places_template_functions.php
*
* @package Thesis
*/
add_action('thesis_hook_after_html', 'set_one_sidebar');
thesis_html_framework();
function set_one_sidebar(){
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
$(document).ready(function(){
$('#sidebar_2').hide();
$('#sidebars').css('width', '230px');
$('#content').css('width', '718px');
$('#content_box').css('background-position', '715px');
});
//-->
</SCRIPT>
<?php
}
?>