![]() |
Text Boxes in place of Featured Content Boxes
Hi there,
The site I am working on will not have any articles/content as such to feature, so I am wondering if it's possible to swap out the Featured Content areas and have a text widget or box in their place. Similar to the text areas on the Streamline homepage. I tried copying and pasting details from Streamline but only eneded up with a giant mess. One thing Ive done already is to flip the boxes around so that the larger one is on top and the two smaller ones are beneath it.... What I am trying to achieve is: (1) the large one will be a Welcome with just a few paragraphs of text and then the small ones will be (2) one small one would be a miniature version of a map that will link back to the main Map Page I have set up (3) the other small one would be a News box which would feature the latest 1-3 entries from a News page.... Basically - its only the News box that would be dynamic, if that makes any sense? I have set up a category for this if that makes a difference? Any suggestions on how to handle this would be greatly appreciated. This is the code for my homepage as it currently stands... <?php get_header(); ?> <div id="content"> <div id="homepage"> <div id="homepagetop"> <div class="featuredtop"> <?php echo apply_filters('the_content', '[slideshow=1]'); ?> </div> </div> <div id="homepagebottom"> <div class="hpbottom"> <h3><?php echo cat_id_to_name(get_theme_mod('featured_bottom')); ?></h3> <?php $recent = new WP_Query("cat=".get_theme_mod('featured_bottom')." &showposts=".get_theme_mod('featured_bottom_num')) ; while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "thumb", true) ): ?> [img]<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, [/img]&h=<?php echo get_theme_mod('featured_bottom_thumb_height'); ?>&w=<?php echo get_theme_mod('featured_bottom_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /> <?php else: ?> <?php endif; ?> <?php the_title(); ?> <?php the_content_limit(350, __("[Read more of this review]", 'studiopress')); ?> <hr/> <?php endwhile; ?> <?php $cat = get_category(get_theme_mod('featured_bottom')); ?> <?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?> </div> </div> <div id="homepageleft"> <div class="hpfeatured"> <h3><?php echo cat_id_to_name(get_theme_mod('featured_top_left')) ; ?></h3> <?php $recent = new WP_Query("cat=".get_theme_mod('featured_top_left') ."&showposts=".get_theme_mod('featured_top_left_nu m')); while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "thumb", true) ): ?> [img]<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, [/img]&h=<?php echo get_theme_mod('featured_top_left_thumb_height'); ?>&w=<?php echo get_theme_mod('featured_top_left_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /> <?php else: ?> <?php endif; ?> <?php the_title(); ?> <?php the_content_limit(80, ""); ?> <hr/> <?php endwhile; ?> <?php $cat = get_category(get_theme_mod('featured_top_left')); ?> <?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?> </div> </div> <div id="homepageright"> <div class="hpfeatured"> <h3><?php echo cat_id_to_name(get_theme_mod('featured_top_right') ); ?></h3> <?php $recent = new WP_Query("cat=".get_theme_mod('featured_top_right' )."&showposts=".get_theme_mod('featured_top_right_ num')); while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "thumb", true) ): ?> [img]<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, [/img]&h=<?php echo get_theme_mod('featured_top_right_thumb_height'); ?>&w=<?php echo get_theme_mod('featured_top_right_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /> <?php else: ?> <?php endif; ?> <?php the_title(); ?> <?php the_content_limit(80, ""); ?> <hr/> <?php endwhile; ?> <?php $cat = get_category(get_theme_mod('featured_top_right')); ?> <?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?> </div> </div> </div> <?php include(TEMPLATEPATH."/sidebar.php");?> </div> <?php // The main column ends ?> <?php get_footer(); ?> |
Re: Text Boxes in place of Featured Content Boxes
honestly, if your welcome area isn't going to be dynamic? The easiest way to do it is just to dump your text right into home.php. (open a post, compose how you want it to look, upload images, etc, then switch to html mode and copy that to paste into home.php)
Crude, but it works ;) I would never do it this way for a site I built for a client but I can and have done my own sites that way for text that will rarely be changed. |
Re: Text Boxes in place of Featured Content Boxes
Thanks for the quick reply.
But if you would never do it this way for your clients then what do you do?? Kind Regards |
Re: Text Boxes in place of Featured Content Boxes
for my clients I go into the functions.php, register another sidebar, widgetize it, and call the newly created sidebar as a text widget area in home.php.
alternately, I go grab the improved include page plugin, as well as the exclude pages one, and create a page that doesn't appear on the navbar, but does pull through into home.php. |
Re: Text Boxes in place of Featured Content Boxes
Thanks for that!
Im happy to give things a go - its the only way way to learn. I have learned so much from this forum in the short time that Ive been here and Im grateful forthe guidance. Much appreciated :) :) |
Re: Text Boxes in place of Featured Content Boxes
you're welcome :) Like I said, I always shortcut it for me, but for everyone else I do it the long way lol.
|
| All times are GMT -5. The time now is 12:00 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.