...

View Full Version : Moving php elements in my layout



Webpacks
10-18-2009, 04:09 PM
Hi all

Really hope someone here can help coz this is driving me nutts!!! :confused:

I'd like to move a couple of PHP elements around in my layout: http://www.acaiberrydirectuk.co.uk/dev/ At the top of the right sidebar you'll see a mauve box with the title 'About', I'd like to replace this box with the RSS and email subcribe box with the search box below it...currently the rss and search boxes are also in the right side bar below the 4 ads...I've tried to do this myself a few times by commenting out what I thought was the appropriate section of code but whatever I do seems to throws the rest of the sidebar layout out.

Here's the sidebar.php code


<style type="text/css">
<!--
.style1 {
color: #FFFFFF
}
.style2 {color: #FF00FF}
-->
</style>
<style type="text/css">
<!--
.style3 {color: #FF33FF}
-->
</style>
<div class="rightcont">
<?php
if(is_home()){
?>
<div class="welcome">

<?php
$my_query = new WP_Query('pagename=' . get_option("fp_bz_page_name"));
while ($my_query->have_posts()) : $my_query->the_post();
?>
<h2 class="welcometitle">
<?php the_title(); ?>
</h2>
<div class="welcomedes">
<?php the_excerpt(); ?>
<!-- <?php the_content(); ?>-->
</div>
<?php endwhile;?>
</div>

<?php } ?>
<div class="sponsers">
<div class="sponserframe"><?php if (function_exists('dfrads')) { echo dfrads('3832183'); } ?></div>
<div class="sponserframe"><?php if (function_exists('dfrads')) { echo dfrads('4760302'); } ?></div>
<div class="sponserframe"><?php if (function_exists('dfrads')) { echo dfrads('6458578'); } ?></div>
<div class="sponserframe"><?php if (function_exists('dfrads')) { echo dfrads('9997021'); } ?></div>
<div class="clear"></div>
</div>
<div class="welcome">
<form id="searchform" method="get" action="<?php bloginfo('home'); ?>" style="margin:0px;">
<input type="text" name="s" class="searchbox" value="search by keywords" onclick="if (this.value=='search by keywords'){this.value='';}else{this.value='search by keywords'}" onblur="if (this.value==''){this.value='search by keywords'}" />
<input type="submit" value="SEARCH" class="searchbutton" />
<div class="clear"></div>
</form>
<div class="clear"></div>
</div>

<div class="welcome">
<h2 class="welcometitle style1">Subscribe Via Email</h2>
<div class="welcomedes">
<div style="text-align:right;padding-bottom:5px; float:right; width:120px;"><a href="http://feeds2.feedburner.com/<?php echo get_option('fp_bz_feedburner');?>"><img src="http://feeds2.feedburner.com/~fc/<?php echo get_option('fp_bz_feedburner');?>?bg=333333&amp;fg=CCCCCC&amp;anim=0" height="26" width="88" style="border:0" class="icon" alt="" /></a></div>

<div style="padding-bottom:5px; font-size:12px; float:left; width:200px;"><a href="<?php bloginfo('rss2_url'); ?>" class="orng style2" rel="nofollow"><strong>Posts RSS</strong></a> | <a href="<?php bloginfo('comments_rss2_url'); ?>" class="orng style3" rel="nofollow"><strong>Comments RSS</strong></a></div>
<div class="clear"></div>
<div style="padding-bottom:5px; color:#CCCCCC;">Subscribe to RSS via Email</div>
<form action="http://feedburner.google.com/fb/a/mailverify?uri=<?php echo get_option('fp_bz_feedburner');?>" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo get_option('fp_bz_feedburner');?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<div>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td><input type="text" id="email" class="searchbox" name="email"/><input type="submit" id="Subscribe" name="Subscribe" class="searchbutton" value="Register" /><div class="clear"></div></td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" value="<?php echo get_option('fp_bz_feedburner');?>" name="uri"/>
<input type="hidden" name="loc" value="en_US"/>

</form>
</div>
</div>

<div class="categoriesmainframe" id="cate">
<div class="categories2" id="lcate">
<h2 class="catetitle">Categories</h2>
<ul class="catelisting">
<?php

wp_list_categories('orderby=name&show_count=0&use_desc_for_title=0&title_li=&depth=1&hide_empty=0');

?>

</ul>
</div>



<div class="categories3" id="rcate">
<h2 class="catetitle">Archives</h2>
<ul class="catelisting">
<?php echo str_replace("<a ", "<a rel=\"nofollow\"", wp_get_archives('type=monthly&limit=12&show_post_count=0&echo=0')); ?>

</ul>
</div>


<div class="clear"></div>


</div>

<div class="sponsers2">
<?php if (function_exists('dfrads')) { echo dfrads('1841204'); } ?>

</div>

<div class="categoriesmainframe" id="arch">
<div class="categories2" id="lcate1">
<h2 class="catetitle">Blogroll</h2>
<ul class="catelisting">
<?php echo str_replace("Blogroll", "",strip_tags(wp_list_bookmarks('title_li=&category_before=&category_after=&echo=0'),"<li><a>")); ?>

</ul>
</div>



<div class="categories3" id="rcate1">
<h2 class="catetitle">Pages</h2>
<ul class="catelisting">
<?php wp_list_pages('title_li=&depth=0&echo=1'); ?>

</ul>
</div>


<div class="clear"></div>


</div>



</div>

I'd also like to add the rss icon to the Posts and Comments subsribe links...

Many thanks in advance

Neil :cool:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum