Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

[SOLVED] How to create grid style for the posts


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Nov 5, 2009, 02:37 AM
m0r6h3us
 
12 posts · Nov 2009
Hi and thaaaanks soo much for the theme, it's wonderful!!!!
i would like to know if it's possibile change the style of the central page in something like a magazine news, that could be like that for the first page:

----------------------
-xxxxxxxxxxxxxxxxxxxx-
-xxxxxxxxxxxxxxxxxxx -
----------------------
-xxxxxxxxx-xxxxxxxxxx-
-xxxxxxxxx-xxxxxxxxxx-
----------------------
-xxxxxx-xxxxxx-xxxxxx-
-xxxxxx-xxxxxx-xxxxxx-
----------------------
and for the others page only in 3 columns...

Any ideas?

Last edited by m0r6h3us; Nov 5, 2009 at 02:55 AM.
  #2  
Old Nov 5, 2009, 09:27 AM
juggledad's Avatar
juggledad
 
22,323 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
not sure if I understand the question. Do you mean teh center colum where the posts go? If so there are styling options for the entire center column and for the area that holds the posts. Go take a look at ATO->Style POSTS & PAGES
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 5, 2009, 09:36 AM
m0r6h3us
 
12 posts · Nov 2009
Hi, thanks for your answer.
In the truth, i was looking for something like that:

last post: 100% width
2 & 3 posts: 50 %
all the others: 33%

I think it's more like magazine tamplate than others, and i found this one:
http://wpgpl.com/wp-content/uploads/...ress-theme.jpg

but i prefer made this changes in the atahualpa theme because I think it's a very powerful template.
  #4  
Old Nov 5, 2009, 01:20 PM
juggledad's Avatar
juggledad
 
22,323 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
WIth the theme as is, the anwser is no. The center column is a cell of a table. You could try puting widgets in the center area each displaying one or more posts or digging into the code or making a template, but it's not a theme option that is esaily done...as far as I know...
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Oct 14, 2011 at 02:41 PM.
  #5  
Old Nov 5, 2009, 05:01 PM
m0r6h3us
 
12 posts · Nov 2009
Ok, thank u.
Wherever, if can be interesting for the community, when I'll made these modify, i should post here the code... i think I need to add just few rows in the css file and pesonalize the central loop... all of that can be done just in the theme options....
  #6  
Old Nov 5, 2009, 05:07 PM
juggledad's Avatar
juggledad
 
22,323 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
if you get it to work and will post the code in this thread, that would be great. this way others can benefit.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Nov 5, 2009, 05:09 PM
m0r6h3us
 
12 posts · Nov 2009
perfect... I'll keep in mind
  #8  
Old Nov 6, 2009, 04:11 PM
sccornwell
 
3 posts · Oct 2009
Yes, please post when you have it!
  #9  
Old Nov 7, 2009, 04:05 PM
m0r6h3us
 
12 posts · Nov 2009
I'm working on...
  #10  
Old Nov 11, 2009, 01:58 PM
m0r6h3us
 
12 posts · Nov 2009
Ok guys,
u can see a preview here:
http://www.rionero24ore.com/

The template is under test, if u can help me to find any bugs would be perfect.
Tell me what u think about
  #11  
Old Nov 11, 2009, 02:12 PM
juggledad's Avatar
juggledad
 
22,323 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
looks good!
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #12  
Old Nov 11, 2009, 08:39 PM
rightofu
 
3 posts · Nov 2009
nice work, Ive been looking for this
  #13  
Old Nov 12, 2009, 03:04 AM
m0r6h3us
 
12 posts · Nov 2009
I'm testing the application, soon I'll post here the code.
The template will work better if the number of posts to show in frontpage is a multiple of 3.
Yesterday I fixed a bug (when the last post in a page is less then a 3 multiple).
I used a function to show a preview image, I had to read if there is some copyright.
Done that, I'll made a smart "how to" to explain my work, but I can tell u it's very simple.
Just adding code in the Atahualpa lood, adding a check rule at the end of the loop, adding few rows in the css form and just 1 functions in the functions file, the work it's done.
  #14  
Old Nov 15, 2009, 11:16 AM
m0r6h3us
 
12 posts · Nov 2009
I founded around on Internet the function I used, so i think it's possible re-use it .
Before we started, please backup your previous settings.



So... to have your grid view like 1-2-3-3...3 u have to modify (Atahualpa interface):



1. Style & edit CENTER COLUMN->The Loop :
------------------------------------------------------------------------------------------------

<?php

//WordPress Theme: Atahualpa 3.4.1
//Modified by: Adelio Fioritto (http://www.adeliofioritto.com)
//Abstract: Enable grid view for the Atahualpa theme in 1-2-3 column
//Preview: http://www.rionero24ore.com

// For the frontpage... start editing here
if ( is_front_page() ) { //check frontpage

$paged = get_query_var('paged'); //retrieve the global page number
$post_numbers=get_query_var('posts_per_page'); //retrieve the global variable 'how many post to show'
?>

<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<?php } else { ?>
<?php } ?>
<?php $current_post=$bfa_ata['postcount']; //retrieve the current post number ?>

<?php if ($paged==0) { ?>
<?php if ($current_post==1){?> <div id="new_central_loop"> <?php } ?>
<?php if ($current_post==2){?> <div id="new_central_loop"><div id="new_left_pos_50"> <?php } ?>
<?php if ($current_post==3){?> <div id="new_right_pos_50"> <?php }?>
<?php if ((($current_post-1)%3==0) && ($current_post>3)) {?> <div id="new_central_loop"><div id="new_left_pos_30"> <?php } ?>
<?php if ((($current_post-2)%3==0) && ($current_post>3)) {?> <div id="new_central_pos_30"> <?php } ?>
<?php if ((($current_post-3)%3==0) && ($current_post>3)) {?> <div id="new_right_pos_30"><?php } ?>


<?php } if ($paged!=0){ ?>
<?php if ((($current_post-1)%3==0)) {?> <div id="new_central_loop"><div id="new_left_pos_30"> <?php } ?>
<?php if ((($current_post-2)%3==0)) {?> <div id="new_central_pos_30"> <?php } ?>
<?php if ((($current_post-3)%3==0)) {?> <div id="new_right_pos_30"><?php } ?>
<?php } ?>


<?php //bfa_post_kicker('<div class="post-kicker">','</div>'); ?>

<div class="post_footer">
<?php
the_time('j F Y'); ?>
<font style="font-style:italic;"><?php _e('by'); ?> <?php the_author(); ?><br>
<?php edit_post_link('Edit', '', ' '); ?> &sect; <?php comments_popup_link('Nessun Commento', '1 Commento', '% Commenti'); ?></font>
</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>');*/

if ((($current_post!=1) && ($paged==0)) || ($paged!=0)){
$key="thumbnail";
if(get_post_meta($post->ID, $key, true)):
$inis = get_post_meta($post->ID, $key, true);
else:
$inis = catch_that_image();
endif;
if(!empty($inis)): ?>
<div class="theimage pik" style="background: url(<?php echo $inis; ?>) center top no-repeat; width: 120px; height:90px; border: 1px solid #777;"></div>
<?php endif;

$texter = get_the_excerpt();
if(strlen($texter ) > 500) {
$texter = substr($texter , 0, 500);
}
echo ''.$texter.'[...]';
}
if (($current_post==1)&& ($paged==0)){
echo(the_content());
}
?>

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

<?php //bfa_post_footer('<div class="post-footer">','</div>'); ?>

<!-- / Post -->

</div>

<?php if ($paged==0) { ?>
<?php if ($current_post==3){?> </div><?php }?>
<?php if ($current_post==2){?> <?php } ?>
<?php if ($current_post==1){?> <?php }?>
<?php if ((($current_post-3)%3==0) && ($current_post>3)) {?> </div> <?php } ?>

<?php }
elseif ($paged!=0) { ?>
<?php if ((($current_post-3)%3==0) ) {?> </div> <?php } ?>

<?php } ?>

<?php if (($current_post==$post_numbers)){?>
<?php }
}
if ( !(is_front_page()) ) {

//original loop

?>

<?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 }
// For the other pages... the original loop
else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?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 -->

<?php } ?>



2. Style & edit CENTER COLUMN -> Content BELOW the LOOP : add this code at the TOP :
------------------------------------------------------------------------------------------------

<?php
$post_numbers=get_query_var('posts_per_page');
$current_post=$bfa_ata['postcount'];
if (($post_numbers!=$current_post) && (($current_post-3)%3!=0) ){ ?>
</div>
<?php } ?>



3. Add HTML/CSS Inserts -> CSS : Inserts :
------------------------------------------------------------------------------------------------

#new_central_loop {clear:left; overflow:hidden; border-bottom: dashed 1px #cccccc;margin-top:10px;margin-bottom:10px;padding-bottom:10px; }

#new_left_pos_50 {float: left; width:48%; margin-right:2%;margin-top:10px;margin-bottom:10px; }

#new_right_pos_50 {float: left; width:48%; margin-left:2%;margin-top:10px;margin-bottom:10px;}

#new_left_pos_30 {float: left; width:31%; margin-right:2%; margin-top:10px;margin-bottom:10px;}

#new_central_pos_30{float: left; width:30%; margin-left:2%;margin-right:2%; margin-top:10px;margin-bottom:10px;}

#new_right_pos_30 {float: left; width:31%;margin-left:2%;margin-top:10px;margin-bottom:10px;}

.lastimage img, .theimage img, .theright img { border: 1px solid #888;}
.theimage {float: right;margin-left: 10px;}



4. EDITOR -> functions.php : add this function :
------------------------------------------------------------------------------------------------

function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];

if(empty($first_img)){ //Defines a default image
// $first_img = bloginfo('template_directory') . "/images/no-image200.jpg";
}
return $first_img;
}


5. Should works... pls tell me if there is some problem so we should fix it
----------------------------------------------------------------------------------------------

Last edited by m0r6h3us; Nov 17, 2009 at 07:36 AM.
  #15  
Old Nov 15, 2009, 09:25 PM
rightofu
 
3 posts · Nov 2009
workshttp://isxwatch.com/

however my center column is too narrow so it doesnt format well, also Im getting ""); } ?>" after the articles, any ideas where thats coming from?

thanks again!

Last edited by rightofu; Nov 15, 2009 at 11:17 PM.
  #16  
Old Nov 16, 2009, 03:58 AM
m0r6h3us
 
12 posts · Nov 2009
Seems to be an error in the php/theme translation.

Try to modify the point number

2. "Style & edit CENTER COLUMN -> Content BELOW the LOOP : add this code:"

FROM THIS:
------------
<?php
$post_numbers=get_query_var('posts_per_page');
$current_post=$bfa_ata['postcount'];
if (($post_numbers!=$current_post) && (($current_post-3)%3!=0) ){
echo("</div>");
} ?>

TO THIS:
---------
<?php
$post_numbers=get_query_var('posts_per_page');
$current_post=$bfa_ata['postcount'];
if (($post_numbers!=$current_post) && (($current_post-3)%3!=0) ){ ?>
</div>
<?php } ?>

---------------------------------------------------------------------------------------

Tell me if works

PS: Some words are written in Italian, as also the Date Format... if u want change them, u can do directly in the "the loop".
For the English:

- In the "POST_ FOOTER" div, change the expression time in this one:
the_time('F jS, Y')

- Always in the "POST_FOOTER" div, change the comments_popup_link(......) in this one:
comments_popup_link('No Comments', '1 Comment', '% Comments')

Last edited by m0r6h3us; Nov 16, 2009 at 04:10 AM.
  #17  
Old Nov 16, 2009, 07:11 AM
rightofu
 
3 posts · Nov 2009
ok, looks good so far. I will post if I find any other isssues

thanks!
  #18  
Old Nov 16, 2009, 07:31 AM
m0r6h3us
 
12 posts · Nov 2009
U are welcome
  #19  
Old Nov 19, 2009, 02:37 PM
m0r6h3us
 
12 posts · Nov 2009
if there are no more questions, I should sign this post as "solved".

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a Home Page with Posts in it? wdycus Post-Kicker, -Byline & -Footer 5 Aug 31, 2010 07:48 AM
Style & edit center column with sorted posts by category calutateo Plugins & Atahualpa 0 Aug 14, 2009 11:43 AM
gallery (grid) of post excerpts w/ thumbnails viewdesigninc Atahualpa 3 Wordpress theme 1 Jun 4, 2009 09:08 AM
How to create a homepage with links to featured posts scrubbs Post-Kicker, -Byline & -Footer 9 May 31, 2009 07:22 PM
Editing the table style and in the posts kirinafa Atahualpa 3 Wordpress theme 1 Mar 1, 2009 04:54 PM


All times are GMT -6. The time now is 11:34 PM.


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