Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

[SOLVED] How to display excerpts inside tables?


  #1  
Old Dec 8, 2009, 08:19 AM
JFG
 
44 posts · Jul 2009
Canada
Hi,

I would like to display each excerpt on multiple-post pages (including post title and excerpt) inside individual tables on which I would put a border. Anyone know how I can do this?

And I would like to make the text in the excerpts justified.

Thanks for any input...

JFG
  #2  
Old Dec 8, 2009, 08:55 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you can style the post container. each post sits inside a post container and they all sit inside the center column - see http://callofthemuse.com/ for an example. In this case I have the first post full and the rest excerpts, but each in their own box

Is this what you are looking for?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Dec 8, 2009, 10:50 AM
JFG
 
44 posts · Jul 2009
Canada
Yes! This is exactly what I want to do. I added the border I wanted in the post container. But now I have another problem... it also adds them on the pages but I only want this to affect posts. How would I go about it?

And while I'm at it... how would I only add the borders to the excerpts and not the posts themselves?

Many thanks!

JFG
  #4  
Old Dec 8, 2009, 11:23 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
hmmm, see pages are actually a special kind of post. you will have to do some CSS Inserts the backout the changes for pages you can use 'body.page' to identify the 'page' pages vrs the multi-post or single-post pages (body.blog and body.single)

to see what CSS you need to change, set the color to 123456, then view the source and search for 123456. You should see teh CSS you need to 'reverse'.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Dec 8, 2009, 11:47 AM
JFG
 
44 posts · Jul 2009
Canada
Well, I don't understand what you just explained. Would it be more simple to have just the excerpts show up with the border on the container - or is the same container as the posts and pages in the code as well?
  #6  
Old Dec 8, 2009, 11:50 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
It's the same container. What you want to do is doable, it will just take some CSS Inserts. You will have to look at how the container is stled now, then create CSS Inserts for the way you want it to be different. By using the 'body.xxxxx' selector, you can direct the new CSS to just certian types of pages.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Dec 8, 2009, 12:12 PM
JFG
 
44 posts · Jul 2009
Canada
Ok...

I've found this in the source code for the page:

div.post,div.page{display:block;margin:0 0 30px 0;border:solid 1px #123456;padding:15px;-moz-border-radius:10px}

So I tried to add this into the css insert (bolded text is what I changed):

.div.post,body.page{display:block;margin:0 0 30px 0;border:solid 0px #123456;padding:15px;-moz-border-radius:10px;}

...but it's not working
  #8  
Old Dec 8, 2009, 02:08 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
yeah that wouldn't work since the 'div.post in inside the body.page try this
HTML Code:
body.page div.post, body.page {
  display:block;
  margin:0 0 30px 0;
  border:solid 0px #123456;
  padding:15px;
  -moz-border-radius: 10px;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Dec 8, 2009, 08:24 PM
JFG
 
44 posts · Jul 2009
Canada
It has worked! Thank you!

I've added a second section of code using the body.single to remove the border around the single post pages and I only have it around the excerpts like I want.

Except that it is still showing on full posts appearing on multi-post pages. On my home page there's a full post (followed by a bunch of excerpts), and I would like to remove the border on that full post. Is there an identifier for full posts on multi-post pages that would allow me to use the code above to strip them of the borders as well?

The end goal is to have borders only on excerpts.

Again, thank you so much for your help!
  #10  
Old Dec 9, 2009, 06:32 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
There is currently nothing built in to let you know if a post is an excerpt or not. you could change the code - you will have to do this on every upgrade.

Edit bfa_post_parts.php and change lines 108-128 (version 3.4.4) from
HTML Code:
function bfa_post_bodycopy($before = '<div class="post-bodycopy clearfix">', $after = '</div>') {
	
	global $bfa_ata, $post;
	
	echo $before; 
	if ( (is_home() AND $bfa_ata['excerpts_home'] == "Full Posts") OR 
	(is_category() AND $bfa_ata['excerpts_category'] == "Full Posts") OR 
	(is_date() AND $bfa_ata['excerpts_archive'] == "Full Posts") OR 
	(is_tag() AND $bfa_ata['excerpts_tag'] == "Full Posts") OR 
	(is_search() AND $bfa_ata['excerpts_search'] == "Full Posts") OR 
	(is_author() AND $bfa_ata['excerpts_author'] == "Full Posts") OR 
	is_single() OR is_page() OR 
	(is_home() AND !is_paged() AND $bfa_ata['postcount'] <= $bfa_ata['full_posts_homepage']) ) { 
		$bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata['more_tag']);
		the_content($bfa_ata_more_tag_final); 
	} else { 
		the_excerpt(); 
	} 
	echo $after;
	
}
to
HTML Code:
function bfa_post_bodycopy($before = '<div class="post-bodycopy clearfix">', $after = '</div>') {
	
	global $bfa_ata, $post;
	
	if ( (is_home() AND $bfa_ata['excerpts_home'] == "Full Posts") OR 
	(is_category() AND $bfa_ata['excerpts_category'] == "Full Posts") OR 
	(is_date() AND $bfa_ata['excerpts_archive'] == "Full Posts") OR 
	(is_tag() AND $bfa_ata['excerpts_tag'] == "Full Posts") OR 
	(is_search() AND $bfa_ata['excerpts_search'] == "Full Posts") OR 
	(is_author() AND $bfa_ata['excerpts_author'] == "Full Posts") OR 
	is_single() OR is_page() OR 
	(is_home() AND !is_paged() AND $bfa_ata['postcount'] <= $bfa_ata['full_posts_homepage']) ) { 
		echo $before; 
		$bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata['more_tag']);
		the_content($bfa_ata_more_tag_final); 
	} else { 
        $before = '<div class="post-bodycopy clearfix post-is-excerpt">';
        echo $before; 
		the_excerpt(); 
	} 
	echo $after;
	
}
HOWEVER, this will only effect the body of the post ie if you use the new class 'post-is-excerpt' to add a border, it will only go around teh body of the post, not the whole post.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Dec 14, 2009, 01:19 PM
JFG
 
44 posts · Jul 2009
Canada
Curiously, this code :

body.page div.post, body.page {
display:block;
margin:0 0 30px 0;
border:solid 0px #123456;
padding:15px;
-moz-border-radius: 10px;
}

... removed the space above and below the layout.

I've modified my design to accomodate borders on the posts and pages too. Thank you for your help!
  #12  
Old Dec 14, 2009, 01:24 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Yes that will work, but it won't differentiate between full poses and excertps.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display only one category page as excerpts adelante Excerpts, Read more, Pagination 5 Nov 9, 2009 03:21 PM
Adding php or function inside content Miak Post-Kicker, -Byline & -Footer 0 Sep 7, 2009 06:50 AM
Put Number of Comments Inside an Icon? NealSchaffer Comments, trackbacks & pings 0 Jul 16, 2009 04:47 PM
[SOLVED] Banner inside posts evripidis Excerpts, Read more, Pagination 9 Jul 6, 2009 04:15 PM
How to display page excerpts and images on sidebar (or, strange widget behaviour) reallylost Sidebars & Widgets 5 Jun 4, 2009 07:27 AM


All times are GMT -6. The time now is 08:53 AM.


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