Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

I want (i did) split the center column in two columns and want to fill it


  #1  
Old Aug 13, 2009, 12:36 PM
Sakshin
 
66 posts · Aug 2009
Amsterdam, Netherlands
I divided the centercolumn into two colomns, Have a look at http://newspiration.com/news/ of the home page horizontal, on the other pages vertical. I did this by pasting the div structure into the text area.
But now I want to show a different category on each static page, and to make it more complicated, the last post of this specific category should appear (in full) in the left column and the last 4 posts should appear (image exerpts or text exerpts) in the right column. For older posts of that specific category, you should somehow end up in the specific categorie archive.

i used the technic offered here and changed the % to fixed withs.

It all workes fine but now I want to fill the columns with posts.

Any advice is apreciated.
  #2  
Old Aug 13, 2009, 02:04 PM
Sakshin
 
66 posts · Aug 2009
Amsterdam, Netherlands
I found a piece of script that might be usefull? http://forum.bytesforall.com/showpos...93&postcount=2 and then maybe add the name of the div where it's suppost to show?

I don't know.
  #3  
Old Aug 15, 2009, 04:27 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You should create a new page template for this (covered a couple times on the forum here, or see http://codex.wordpress.org/Pages#Cre...Page_Templates ) with your HTML, then use the code from the thread you posted to hard code specific WP queries into the various sections of your page template.

Create a new page in WP without content, upload the page template to the Atahualpa directory, and on the drop down menu on the top right of Site Admin -> Pages -> Add New / Edit Write Panel choose the new page template as the template for the new page

To create a page template, make a copy of Atahualpa's index.php, and modify if by removing unnecessary things, and by adding your DIV's. On top of the page template add its name as seen on http://codex.wordpress.org/Pages#Cre...Page_Templates
  #4  
Old Aug 16, 2009, 09:05 AM
Sakshin
 
66 posts · Aug 2009
Amsterdam, Netherlands
Thanx Flynn, for the help. I've gotten somewhere, but my posts won't show up.
This is what I'm aiming at; http://newspiration.com/news/ and this is what I've created by making a new template; http://newspiration.com/news/test-new-index/ .

and this is the code I've entered into the template; What am I missing?

<?php
/*
Template Name: twocol_h
*/
?>

<?php /* get all options: */
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
get_header(); ?>

<div class="txtboxhome1">

<?php if ( is_page('217') ) { ?>
<?php $my_query = new WP_Query('category_name=news&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post(); ?>

This should display the latest post in category 'news'


<?php endwhile; ?>
<?php } ?>

<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] == 1; /* Postcount needed for option "1 first posts full posts" */ ?>

</div>

<div class="txtboxhome2">

<?php if ( is_page('217') ) { ?>
<?php $my_query = new WP_Query('category_name=vip&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post(); ?>

This should display an exerpt of 4 lines of the latest post in category 'vip'

<?php endwhile; ?>
<?php } ?>
<br /><br />
<?php if ( is_page('217') ) { ?>
<?php $my_query = new WP_Query('category_name=inspiration&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post(); ?>

This should display an exerpt of 4 lines of the latest post in category 'inspiration'

<?php endwhile; ?>
<?php } ?>

<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>

<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>

<?php endif; /* END of: If there are no posts */ ?>

<?php bfa_center_content($bfa_ata['center_content_bottom']); ?>
</div>

<?php get_footer(); ?>


With regards, Sakshin
  #5  
Old Aug 16, 2009, 10:01 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Replace

This should display the latest post in category 'news'

with i.e.

<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3><?php the_content(); ?>
  #6  
Old Aug 16, 2009, 05:31 PM
Sakshin
 
66 posts · Aug 2009
Amsterdam, Netherlands
Yes, you are right. This works. Thanks a lot,

Sakshin.
  #7  
Old Aug 24, 2009, 07:24 PM
sspeedy
 
7 posts · Aug 2009
Sakshin,

I'm having a hard time doing a split. Can you expand on "I did this by pasting the div structure into the text area. " I'm assuming you had to create multiple loops... can you also explain how you did that? Thanks.
  #8  
Old Aug 30, 2009, 01:02 PM
Sakshin
 
66 posts · Aug 2009
Amsterdam, Netherlands
Well, as I wrote, all I did the first time was paste the <div coll1></div> and <div coll2></div> into the text area of each page and gave CSS style info into the CSS panel from Atahualpa. It looked ok but is not really wordpress. So I went a bit further and made separate template files for different pages ond glued the above div stucture into these files, with the needed database requests in between.

Was this any helpfull?
  #9  
Old Aug 30, 2009, 01:03 PM
Sakshin
 
66 posts · Aug 2009
Amsterdam, Netherlands
Here's a full example;

<div class="txtboxarchive1">

<p><h3>This weeks inspiration posts:</h3></p>

<?php if ( is_page('') ) { ?>
<?php $my_query = new WP_Query('category_name=news&showposts=4');
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<h3><?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<br></br>


<?php endwhile; ?>
<?php } ?>

<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] == 1; /* Postcount needed for option "1 first posts full posts" */ ?>

<?php if ( is_page('') ) { ?>
<?php $my_query = new WP_Query('category_name=inspiration&showposts=4');
while ($my_query->have_posts()) : $my_query->the_post(); ?>

<h3><?php the_title(); ?></h3>
<?php the_content(); ?><br />

<?php endwhile; ?>
<?php } ?>

</div>

<div class="txtbox_small">

<?php get_sidebar(''); ?>

<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>

<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>

<?php endif; /* END of: If there are no posts */ ?>

</div>

<div class="clear"></div>

<?php get_footer(); ?>


Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Center Column Overlapping Right Sidebar nselegzi Sidebars & Widgets 11 Dec 1, 2009 06:18 PM
Only one category in center column majofa Page & Category Menu Bars 3 Aug 13, 2009 02:24 PM
Center column issue in Safari AndrewCampbell Atahualpa 3 Wordpress theme 1 Aug 7, 2009 06:58 PM
Center Column chiaxiong Atahualpa 3 Wordpress theme 1 Apr 8, 2009 06:28 PM
Center column content not displaying in IE Bourbonthrall Atahualpa 3 Wordpress theme 2 Mar 2, 2009 01:37 PM


All times are GMT -6. The time now is 09:16 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.