Question

Modifying theme to display a 'split' column

Asked by: sspeedy00

Hey everyone,

I've mainly been a .NET programmer for about 2 years now (I have a degree in comp sci should I should be able to pick up any language!)  I'm about to start an online blog/community using WordPress.  Time is an issue, so I picked WP and a theme.  I was thinking about a free theme vs. Thesis and stumbled upon Atahualpa (free).  So that's what I'm using now.  (It can be downloaded here, if anyone needs to play with it: http://wordpress.org/extend/themes/atahualpa )

Anyway, so I don't have experience with WP, PHP, and know basics of CSS.  What I'm looking to do is, take that center column and have it display 'featured post' which takes up the whole width of the center column.  Then, the center column can be split to display News posts on left and Deals posts on the right.  I hate to do this but if you take a look at problogger.net, you'll probably see what I mean.  Not trying to copy a design, but when I drew it on paper, that's probably the best design for what I'm trying to accomplish here.

So, how do I go about making these "tweaks"?  Does it occur in the loop..?  I see the loop has these.. uh, php tags that display the KICKER, BYLINE, Body, etc.  Or do I directly manipulate the CSS file?

I'm guessing to display the feature post, I'd have to have a feature category, and for news and deals, news and deal categories.  Not sure how this all works as I'm new to WP.

If not possible, then please suggest another theme that can accomplish this.  I'm willing to 'hack it up' and do this with Atahualpa if someone can help me here.

TIA.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-20 at 09:24:53ID24668748
Tags

Atahualpa

,

wordpress theme

,

split column

,

splitting a column

,

splitting a column in wordpress

Topics

WordPress

,

Blogs

,

PHP and Databases

Participating Experts
3
Points
500
Comments
14

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Images not displaying in wordpress blog
    Images in main column (centre column) wont display on my new blog in IE. Very wierd Fine in Firefox. This is Stylesheet link: http://www.worthdesigning.net/wp-content/themes/acid-green-pro-10/style.css This is URL: http://www.worthdesigning.net/wordpress-themes/free-wordpr...
  2. New wordpress blog won't pick up css stylesheet
    I trying to build my first Wordpress theme from scratch so I start with a blank theme template that someone else created and posted to the web. I don't have any background with php, but do have some knowledge of css and extensive knowledge of html. I'm having trouble gettin...
  3. WordPress
    What's the best support & tech help website for WordPress? I plan to integrate WordPress into my CSS/XHTML/PHP website.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: toymachiner62Posted on 2009-08-20 at 12:36:05ID: 25146206

This link might help you understand wordpress better.
http://www.webdesignerwall.com/tutorials/building-custom-wordpress-theme/comment-page-1/#comments

Otherwise try http://wordpress.tv and see if you can find anything there that helps you out.

 

by: NerdsOfTechPosted on 2009-08-20 at 15:49:33ID: 25147833

I think all you need to do is create a table

and find the {template} output areas

// pseudo-code:
<table width="100%">
<tr><td colspan="2">{featured}</td></tr>
<tr>
 <td>
  {News}
 </td>
 <td>
  {Deals}
 </td>
</tr>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:

Select allOpen in new window

 

by: NerdsOfTechPosted on 2009-08-20 at 15:49:41ID: 25147835

</table>

 

by: sspeedy00Posted on 2009-08-20 at 18:38:56ID: 25148502

I'm not sure what you're trying to say, NerdsOfTech.  Why put a table in the loop...?

There will be two main categories: news and deals.  A featured post can be a third category I suppose, but a featured post can be either news OR deals.
Can this be accomplished?  Can I have these three categories but have a post belong to news And featured post or deals AND featured post?

Also, I'm pasting "the loop" code.  I'm having slight trouble understanding this syntax.  I tried to break it up but have a feeling it's not 'right'.  Any help is appreciated if someone can explain where the php and div tags begin and if/else statements.  

Lastly, how can I modify this to say: take latest entry from featured post category, post, take 5 latest entries of news, post on left column, take 5 latest deals entries, post.

I realize I'm asking for a lot, but if I can even get partial answers, that'll be great.

<?php /* Post Container starts here */
if ( function_exists('post_class') ) 
{ 
?>
<div <?php 
	if ( is_page() ) 
	{ 
		post_class('post'); 
	}
 
	else 
	{ 
		post_class("$odd_or_even"); 
	} 
?> id="post-<?php the_ID(); ?>">
<?php 
 
	} 
	else 
	{ ?>
		<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
		<?php 
	} 
	?>
 
	<?php if ($bfa_ata['postcount'] == 1) { ?>
	
	
 
	<?php } ?>
 
 
	<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
 
	<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
 
	<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
	
	<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
 
	<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
 
	<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
 
	
	</div>
 
 
 
<!-- / Post -->

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:

Select allOpen in new window

 

by: NerdsOfTechPosted on 2009-08-20 at 19:01:56ID: 25148591

does this make a mess?

<?php /* Post Container starts here */
if ( function_exists('post_class') ) 
{ 
?>
<div <?php 
        if ( is_page() ) 
        { 
                post_class('post'); 
        }
 
        else 
        { 
                post_class("$odd_or_even"); 
        } 
?> id="post-<?php the_ID(); ?>">
<?php 
 
        } 
        else 
        { ?>
                <div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
                <?php 
        } 
        ?>
 
        <?php if ($bfa_ata['postcount'] == 1) { ?>
        
        
 
        <?php } ?>
 
<table width="100%" border="0"> 
<tr>
<td colspan="2">
        <?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
</td>
</tr>
<td> 
        <?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
</td> 
        <?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<td>        
        <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
</td>
</tr>
</table>
        <?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
 
        <?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
 
        
        </div>
 
 
 
<!-- / Post -->

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:

Select allOpen in new window

 

by: sspeedy00Posted on 2009-08-21 at 08:42:42ID: 25152967

NerdsOfTech, it does look a bit better.  So.. does this mean that an if / else statement has to be wrapped in php tags like so: < ? php .... ? >  ...?

Even though I was reading t hat excellent tutorial on creating your own WP theme, it explains t he basics VERy well.  I've tried google searches and all, only to no avail.  I'm gonna have to find a theme that implements the split column and feature post, and see how they do it.

If anyone sees such a wp theme, please post here.  Thanks.

 

by: NerdsOfTechPosted on 2009-08-21 at 08:55:12ID: 25153111

basically WP utilizes the PHP language to output template "BLOCKS" via built in functions

All I did was place these blocks into a table

a great resource for referencing this language is actually the official PHP site:

www.php.net



With the code I supplied what happened?
Is one area somewhere it shouldn't be?

Thanks!

 

by: gwkgPosted on 2009-08-21 at 13:17:43ID: 25155432

You can create a new "loop" for each category.

There are a couple different ways to create a new loop or even "rewind" the loop.  Have you read through this section? http://codex.wordpress.org/The_Loop#Multiple_Loops





 

by: gwkgPosted on 2009-08-21 at 13:27:32ID: 25155507

This will only display 1 post from the "featured" category if you place it before the Loop

query_posts('category_name=featured&showposts=1');


You can also use cat=4 (changing the 4 to your category number)

Then you can "rewind" the Loop.... rewind_posts();

and start it again with new rules in the News Column

query_posts('category_name=news&showposts=5');

then rewind and start again with posts from the Deals category in the Deals Column.

There are other ways to accomplish this, including reusing, or creating a new query object.  They are all explained in that link I provided.

 

by: sspeedy00Posted on 2009-08-23 at 10:04:33ID: 25163365

gwkg,

Thanks for pointing me to the explanation of The Loop.  So I'm playing around with the theme tags and the loop.  I altered the code a little bit.  I would think this would display all my posts (there are only 3), but it repeats two of them over and over.  The loop runs forever :(, repeating those two entries.  Code is pasted.  Obviously I'm not terminating the loop properly.  Can someone help me with what might be wrong?  Thanks.

<?php if(have_posts()) : ?>
	<?php while(have_posts()) : the_post(); ?>
		<div class="post" id="post-<?php the_ID(); ?>" >
		</div>
		<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
		<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
		<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
		<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
		<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>	 
		<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
	<?php endwhile; ?>
<?php endif; ?>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:

Select allOpen in new window

 

by: NerdsOfTechPosted on 2009-08-23 at 11:57:05ID: 25163780

try:

<?php /* Post Container starts here */ ?>
  <!-- Featured post ... -->
  <?php $my_query = new WP_Query('category_name=featured&showposts=1');
  while ($my_query->have_posts()) : $my_query->the_post();
  $do_not_duplicate = $post->ID;?>
 
  <div class="post" id="post-<?php the_ID(); ?>" >
  </div>
  <?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
  <?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
  <?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
  <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
  <?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>         
  <?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
 
  <?php endwhile; ?>
    <!-- Other posts ... -->
  <?php if (have_posts()) : while (have_posts()) : the_post(); 
  if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
 
  <?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
  <?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
  <?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
  <?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
  <?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>         
  <?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
 
  <?php endwhile; endif; ?>
 
<!-- / Post -->

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:

Select allOpen in new window

 

by: sspeedy00Posted on 2009-08-24 at 18:30:30ID: 25173997

NerdsOfTech: Thanks! I am beginning to understand how a real loop now works.  I found out that with Atahualpa,
it provides you with an 'above loop' part, a below loop part, and a 'the loop' part to enter code.

Turns out I need to set up the query in the above loop part.  But now this poses a problem because
after I post say, <?php $my_query = new WP_Query('category_name=featured&showposts=1');
, in the above loop part and then the loop runs, I'm not sure how the heck to setup multiple loops!  If you'd or anyone would like to take a look at how Atahualpa works, you may check it out at one of the links I provided above.

I thank everyone here, especially Nerds, for going this far to help me understand how the loop works.  I'm getting it, albeit, really slowly.  TIA.

 

by: gwkgPosted on 2009-08-25 at 19:44:38ID: 25184112

Keep using query_posts

   query_posts('category_name=news&showposts=5');

  while (have_posts()) : the_post();
    <!-- Loop through news posts... -->
  endwhile;

   query_posts('category_name=deals&showposts=5');
 
  while (have_posts()) : the_post();
    <!-- Loop through deals posts... -->
  endwhile;


 

by: sspeedy00Posted on 2009-08-27 at 12:30:46ID: 31618233

Got a lot of help but still haven't been able to resolve issue.  Thanks for giving lots of information on the loop and the helpful links!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...