<script language="javascript">
function init() {
//=================================…
// if supported, initialize TransMenus
//=================================…
// Check isSupported() so that menus aren't accidentally sent to non-supporting browsers.
// This is better than server-side checking because it will also catch browsers which would
// normally support the menus but have javascript disabled.
//
// If supported, call initialize() and then hook whatever image rollover code you need to do
// to the .onactivate and .ondeactivate events for each menu.
//=================================…
if (TransMenu.isSupported())
{
TransMenu.initialize();
}
}
</script>
<script language="javascript">
// set up drop downs anywhere in the body of the page. I think the bottom of the page is better..
// but you can experiment with effect on loadtime.
if (TransMenu.isSupported()) {
//===================================…
// create a set of dropdowns
//===================================…
// the first param should always be down, as it is here
//
// The second and third param are the top and left offset positions of the menus from their actuators
// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
// something like -5, 5
//
// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
// of the actuator from which to measure the offset positions above. Here we are saying we want the
// menu to appear directly below the bottom left corner of the actuator
//===================================…
var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft);
//===================================…
// create a dropdown menu
//===================================…
// the first parameter should be the HTML element which will act actuator for the menu
//===================================…
<?php
$Pgs = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status='publish' AND post_parent = 0 AND post_type = 'page'");
foreach($Pgs AS $Pg)
{
$ItemsCounter = 0;
?>
var menu<?php echo $Pg->ID; ?> = ms.addMenu(document.getElementById('m<?p… echo $Pg->ID; ?>'));
<?php
$SubPgs = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status='publish' AND post_parent = '".$Pg->ID."' AND post_type = 'page'");
foreach($SubPgs AS $SubPg)
{
?>
menu<?php echo $Pg->ID; ?>.addItem("<?php echo $SubPg->post_title; ?>", "<?php echo $SubPg->guid; ?>");
//===================================…
// write drop downs into page
//===================================…
// this method writes all the HTML for the menus into the page with document.write(). It must be
// called within the body of the HTML page.
//===================================…
TransMenu.renderAll();
}
</script>
<?php /* Menu for subpages of current page (thanks to K2 theme for this code) */
global $notfound;
if (is_page() and ($notfound != '1'))
{
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
// if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {
$Pgs = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'");
if ($Pgs)
{
The problem: I need to figure out how to effectively integrate that live chat button into my template and I need to move my content up higher towards the navigation bar so there is only a few pixels worth of problem; have been trying to solve this problem for the past few hours and I can't come up with any solutions.
<div id="sidebar">
<div class="sidebar"><form role="search" method="get" id="searchform"
action="[Link](Mouse over link to see full location);
<div><label class="screen-reader-text" for="s">Search for:</label>
<input name="s" id="s" type="text">
<input id="searchsubmit" value="Search" type="submit">
</div>
</form>
<!--PUT CODE HERE-->
</div>
</div><!--//end #sidebar//-->
<div id="content">
You'll need to figure out how to modify the sidebar in WordPress. The code you pasted is getting it from somewhere else with get_sidebar(). [ theymos's advice column | Ask theymos A Question ]
Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content. Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.