SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot bemmott's Avatar
    Join Date
    Mar 2007
    Location
    NY, USA
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Revise template for Wordpress slightly?

    Hope I have this in the correct area. If not feel free to move it

    I would like to adjust the right sidebar area of my new blog using a Wordpress template named "Platinum-10" I have already modified it for colors and feel and added items to the sidebar, but I am flummoxed on how to move an entire section to a different place in the sidebar since I have no clue where things go using PHP.

    The blogs address is http://brucesplace.net/wordpress, and looking at it is easier to explain what I'd like to do than going through the code - which I will add as an attachment if it helps.

    Notice please that the list of "Recommended links" is positioned above the admin panel. What I'd like to do is move it to below the list of "Causes I support", or iow, the last item in the list.

    I've attempted this a few times with an unpleasant result - luckily I had backed up the code for the sidebar. I am unable to figure out how the link properties should appear to make this happen.

    I would greatly appreciate it if someone could rework this code for me so this works as I'd like it.

    Code follows...
    Attached Files Attached Files
    Bruce ...

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since I can't approve attachments, can you please paste the code here inside [php ][/php ] or [code ][/code ] tags (without the spaces)?

  3. #3
    SitePoint Zealot bemmott's Avatar
    Join Date
    Mar 2007
    Location
    NY, USA
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz View Post
    Since I can't approve attachments, can you please paste the code here inside [php ][/php ] or [code ][/code ] tags (without the spaces)?
    Absolutely, Dan. My thanks.

    Code:
    <!-- begin r_sidebar -->
    
    	<div id="r_sidebar">
    	<ul id="r_sidebarwidgeted">
    	<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    	
    	<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    	<div><input type="text" name="s" id="s" />
    	<input type="submit" id="searchsubmit" value="Search" /></div></form><br />
    	
    	<li id="Recent">
    	<center><h2>Recent Posts</h2></center>
    		<ul>
    		<?php get_archives('postbypost', 10); ?>
    		</ul>
    	</li>	
    		
    	<li id="Archives">
    	<center><h2>Archives</h2></center>
    		<ul>
    		<?php wp_get_archives('type=monthly'); ?>
    		</ul>
    	</li>
    		
    	<li id="Blogroll">
    	<center><h2>Recommended Links</h2></center>
    		<ul>
    		<?php get_links(-1, '<li>', '</li>', ' - '); ?>
    		</ul>
    	</li>
    		
    	<li id="Admin">
    	<center><h2>Administration</h2></center>
    		<ul>
    		<?php wp_register(); ?>
    		<li><?php wp_loginout(); ?></li>
    		</ul>
    	</li>
    		
    	
    		<?php endif; ?>
    			
    		</ul>
    		</li>
    <br>
    
    <div align="center">
    <img src="http://brucesplace.net/usflag.gif">
    </div>
    <br />
    <div align="center">
    <img src="http://brucesplace.net/gadsen-anim.gif">
    </div>
    <br />
    
    <DIV ALIGN="CENTER">
    <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">
    		<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png"/><br />Protected by Creative Commons License</a>
    </DIV>
    <BR />
    
    <div align="center"><h2>Wanted by the FBI</h2><br />
    <img src="http://brucesplace.net/adnan.jpg" border="2"><br><br>
    <img src="http://brucesplace.net/adnan2.jpg" border="2">
    <br />
    <strong>Adnan G. El Shukrijumah</strong><br>
    AKA:<br> Adnan G. El Shukri Jumah, Abu Arif, Ja'far Al-Tayar, Jaffar Al-Tayyar, Jafar Tayar, Jaafar Al-Tayyar
    <br><br>Terrorist Threats against U.S.<br>
    If you have any information,<br>
    <a href="http://www.fbi.gov/terrorinfo/elshukrijumah.htm">
    <strong>Contact the FBI immediately!</strong>
    </a>
    </div>
    <br />
    
    <center><h2>For President in 2008</h2></center>
    <br />
    <div align="center">
    <img src="http://brucesplace.net/thompson.png" height="243" width="200" border="1" alt="Fred Thompson">
    </div>
    <br />
    
    <center><h2>Causes I Support</h2></center>
    <br />
    
    <DIV ALIGN="CENTER">
    <a href="http://www.eff.org/br"><IMG SRC="http://www.eff.org/br/br.gif" ALT="Join the Blue Ribbon Online Free Speech Campaign" HEIGHT="76" WIDTH="112" BORDER="0" ALIGN="MIDDLE">
    <BR />
    Join the Blue Ribbon Online Free Speech Campaign!</A>
    </DIV>
    <br />
    
    <div align="center">
    <a href="http://www.fightmediabias.org">
    <img src="http://brucesplace.net/dogtags.gif" border="0"><br><strong>Support Our Troops!<br>Send a Dogtag of Support!</strong>
    </a>
    </div>
    <br />
    
    <div align="center"><a href="http://www.fisherhouse.org/"><img src="http://brucesplace.net/fisherhouse.gif" border="0"></a><br><strong>Help Our Disabled Returnees</strong>
    </div>
    <br />
    
    <div align="center">
    <img src="http://brucesplace.net/troops.gif">
    </div>
    <br>
    
    <div align="center">
    <img src="http://brucesplace.net/citgo.png">
    100&#37; owned by Hugo Chavez
    </div>
    <br>
    
    <div align="center">
    <img src="http://brucesplace.net/unus.jpg" alt="UN or US">
    </div>
    <br />
    
    <div align="center">
    <img src="http://brucesplace.net/fairtax.gif">
    </div>
    <br />
    
    
    </div>		
    
    <!-- end r_sidebar -->
    The line php endif is really confusing me.

    This part of the code:
    Code:
    <li id="Blogroll">
    	<center><h2>Recommended Links</h2></center>
    		<ul>
    		<?php get_links(-1, '<li>', '</li>', ' - '); ?>
    		</ul>
    	</li>
    ... is the part I need to move below the last item in the Causes part (fairtax.gif) The question is ... how

    Any help is appreciated.
    Last edited by bemmott; Jun 9, 2007 at 20:36. Reason: clarification of question
    Bruce ...

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that's just an end call telling WordPress to stop. By the way, get rid of the <br /> right after the </form> tag - it's not necessary. Same with the <center> tags - you can center your text by targeting the headings in the sidebar with CSS instead.

    As for the answer to your question, just cut/paste the LI (and its contents) for the blog roll from its current position to just after the last LI. It'll look like this:
    Code:
    	
    	<li id="Admin">
    	<center><h2>Administration</h2></center>
    		<ul>
    		<?php wp_register(); ?>
    		<li><?php wp_loginout(); ?></li>
    		</ul>
    	</li>
    
    <li id="Blogroll">
    	<center><h2>Recommended Links</h2></center>
    		<ul>
    		<?php get_links(-1, '<li>', '</li>', ' - '); ?>
    		</ul>
    	</li>

  5. #5
    SitePoint Zealot bemmott's Avatar
    Join Date
    Mar 2007
    Location
    NY, USA
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz View Post
    I think that's just an end call telling WordPress to stop. By the way, get rid of the <br /> right after the </form> tag - it's not necessary. Same with the <center> tags - you can center your text by targeting the headings in the sidebar with CSS instead.

    As for the answer to your question, just cut/paste the LI (and its contents) for the blog roll from its current position to just after the last LI. It'll look like this:
    Code:
    	
    	<li id="Admin">
    	<center><h2>Administration</h2></center>
    		<ul>
    		<?php wp_register(); ?>
    		<li><?php wp_loginout(); ?></li>
    		</ul>
    	</li>
    
    <li id="Blogroll">
    	<center><h2>Recommended Links</h2></center>
    		<ul>
    		<?php get_links(-1, '<li>', '</li>', ' - '); ?>
    		</ul>
    	</li>
    That won't do what I want, Dan - that will only move the blogroll down 1 position. I want it at the very end of the right sidebar
    Bruce ...

  6. #6
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    D'oh!

    Ok, move it just above the closing </div> tag in the sidebar, and then wrap <ul></ul> around that and give it an ID. That should do it.

  7. #7
    SitePoint Zealot bemmott's Avatar
    Join Date
    Mar 2007
    Location
    NY, USA
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz View Post
    D'oh!

    Ok, move it just above the closing </div> tag in the sidebar, and then wrap <ul></ul> around that and give it an ID. That should do it.
    I have quite a few of those "D'OH" moments myself

    Okay, THAT worked! I'd really like to know what that endif thib gy means with the php file, but it works so I'm not gonna sweat it. Have to do some research I guess!

    Thanks
    Bruce ...

  8. #8
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The endif is the end of the if else statement above it.

  9. #9
    SitePoint Zealot bemmott's Avatar
    Join Date
    Mar 2007
    Location
    NY, USA
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Johnny Gulag View Post
    The endif is the end of the if else statement above it.
    Johnny-
    Uhhh ... thanks I'm not a programmer, so I don't know what to make of that. I seem to recall in the most basic terms from batch-file writing that an "if-else" statement says that IF something exists - do that, and if not - do something ELSE. Exactly what ... I have absolutely no clue I also have no idea how that does anything with the sidebar since it is PHP!
    Bruce ...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •