![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I have been trying to add a new category to the home page of my site http://tasramar.com on the right hand side under Featured Videos. I had to take it off because there was no formatting and the information was just stuck randomly on the bottom right side.
I tried copying homepage right as it was suggested in another post, but I can't get the formatting to line up. I also tried adding homepageright2, but that didn't help at all. I even went in to stylesheet and duplicated the homepage right info and added homepage right2. Still no luck. Here's the code I used for home.php: <?php get_header(); ?> <div id="content"> <div id="homepage"> <?php /*Check for the 'gallery_styles' function. if it's there, then include it. If not, do nothing*/ ?> <?php if (function_exists('gallery_styles')) : ?> <div id="fcg"> <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?> </div> <?php endif; ?> <div class="homepageleft"> <?php $featured_cat_1 = get_option('chrome_featured_cat_1'); $featured_cat_1_num = get_option('chrome_featured_cat_1_num'); if(!$featured_cat_1) $featured_cat_1 = 1; //setting a default ?> <h3><?php echo cat_id_to_name($featured_cat_1); ?></h3> <div class="homebox"> <?php $recent = new WP_Query("cat=".$featured_cat_1."&showposts=".$fea tured_cat_1_num); while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?> <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a> <?php else: ?> <?php endif; ?> <b><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></b> <?php the_content_limit(125, ""); ?> <div style="border-bottom:1px dotted #C0C0C0; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div> <?php endwhile; ?> </div> </div> <div class="homepageright"> <?php $featured_vid_1 = get_option('chrome_featured_vid_1'); $featured_vid_1_num = get_option('chrome_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?> <h3><?php echo cat_id_to_name($featured_vid_1); ?></h3> <div class="homebox"> <?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$fea tured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?> <b><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></b> <?php the_content(__('Read more'));?> <?php endwhile; ?> <?php $featured_vid_1 = get_option('chrome_featured_vid_1'); $featured_vid_1_num = get_option('chrome_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?> <h4>More <?php echo cat_id_to_name($featured_vid_1); ?></h4> <ul> <?php $featured_vid_1_list = get_option('chrome_featured_vid_1_list'); ?> <?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$fea tured_vid_1_list."&offset=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div> </div> </div> <?php include(TEMPLATEPATH."/sidebar.php");?> </div> <div class="homepageright2"> <?php $featured_vid_1 = get_option('chrome_featured_vid_1'); $featured_vid_1_num = get_option('chrome_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?> <h3><?php echo cat_id_to_name($featured_vid_1); ?></h3> <div class="homebox"> <?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$fea tured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?> <b><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></b> <?php the_content(__('Read more'));?> <?php endwhile; ?> <?php $featured_vid_1 = get_option('chrome_featured_vid_1'); $featured_vid_1_num = get_option('chrome_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?> <h4>More <?php echo cat_id_to_name($featured_vid_1); ?></h4> <ul> <?php $featured_vid_1_list = get_option('chrome_featured_vid_1_list'); ?> <?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$fea tured_vid_1_list."&offset=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div> </div> </div> </div> <!-- The main column ends --> <?php get_footer(); ?> Ideally, I'd like to be able to add an extra category on the right that would pull another section with a featured video. Thanks in advance. |
| Tags |
| category |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding Additional Categories to the Home Page | provirtualassistant | General Discussion | 19 | 05-29-2010 03:54 PM |
| Pre sales: adding categories to display on a home page | shinbet | General Discussion | 4 | 02-22-2010 01:32 PM |
| Adding some more featured categories to home page | turkha | General Discussion | 21 | 11-01-2009 11:18 PM |
| Adding sidebars to the categories page | orangeart | General Discussion | 4 | 10-17-2009 01:02 PM |
| Adding More Categories On Home Page | jdm1108 | General Discussion | 1 | 11-23-2008 03:43 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us