Results 1 to 3 of 3

Thread: move sidebar content to main page

  1. #1
    Thread Starter
    togitron's Avatar
    Join Date
    Apr 2009
    Location
    Philippines
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts

    move sidebar content to main page

    How do you move some of the side bar content to come out on the main page? I wanted to check the code but was scared that i would break it... so asked the question here so others may benefit too.

    I want to place the address and Telephone number right before the related business links...
    also how do i take the date out? dont need the date


    TIA!

  2. #2
    Junior Member
    Not a Verified Customer
    Konvict's Avatar
    Join Date
    Jun 2009
    Location
    Sydney, Australia
    Posts
    39
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: move sidebar content to main page

    Hey buddy,

    The code you're after is found in the single.php file.

    Code:
    		<div style="padding-left:15px;padding-top:10px;padding-bottom:5px;">
    			<div id="location"><?php echo get_post_meta($post->ID, "location", true); ?></div>
    
    
    			<div id="listed"><?php the_time(get_option('date_format') . ' ' . get_option('time_format')) ?></div>
    
    
    			<div id="phone"><?php echo get_post_meta($post->ID, "phone", true); ?></div>
    
    
    			
    			<?php if (get_option('post_prun') == "yes" && get_post_meta($post->ID, "expires", true) != "") { ?>			
    			<div id="expires"><?php $get_expires = strtotime(get_post_meta($post->ID, "expires", true)); echo cp_timeleft($get_expires); ?> 
    			</div>
    
    
    			<?php } ?>		
    
    			
    		</div>
    Place this where you want it, but by the looks of things... it looks like you want it inside the content call... I'm not 100% sure how to do that.

    You can place it below or above this code in single.php and will have a similar effect... :S

    Code:
    	<h3><?php _e('Description','cp'); ?></h3>
    					
    						<?php the_content(); ?>
    The above code handles your posts content, the related posts plugin which you have activated inserts its code inside the "the_content();" function.

    Sorry I cannot be of more help... :P

  3. #3
    Thread Starter
    togitron's Avatar
    Join Date
    Apr 2009
    Location
    Philippines
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts

    Re: move sidebar content to main page

    worked perrfectly.. thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)