Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   make excerpt to a div (http://forum.bytesforall.com/showthread.php?t=16952)

tixcoca Mar 7, 2012 04:10 PM

make excerpt to a div
 
I would like to put global height/width background etc to my excerpts, is that possible? I have not find any plugin or description on how to turn the excerpt into a div.

Thanks
TXC

lmilesw Mar 7, 2012 04:25 PM

The only way I can think go to do that is to use the manual excerpt box and put a div with a height in it. This of course isn't global.

tixcoca Mar 7, 2012 04:59 PM

I can to start with try it out that way. Thanks.

TXC

juggledad Mar 7, 2012 04:59 PM

an excerpts is just a truncated post and is in a DIV with the class 'post-bodycopy'

tixcoca Mar 8, 2012 04:06 AM

Is it not possible to make the excerpt to an exclusive div? When I style 'the post-bodycopy' it messes the post up.

TXH

juggledad Mar 8, 2012 04:19 AM

Quote:

Is it not possible to make the excerpt to an exclusive div?
you could try this - edit bfa_post_parts.php and change line 140 (version 3.7.3) from
HTML Code:

                        the_excerpt();
to
HTML Code:

                        ?> <div class="my-excerpt"> <?php
                        the_excerpt();
                        ?>
</div> <?php

this will give you a class called 'my-excerpt' that you can use to style the excerpts content - ie the body of the excerpt.

If you want to style the entire excerpt container you will have to do a lot more and that is beyond the free help avaliable from me on the forum.

tixcoca Mar 8, 2012 04:46 AM

Perfect, but 'post-headline' got the characters '1>' added :o

juggledad Mar 8, 2012 04:54 AM

the post headline is processed BEFORE this code so it must be something else you did or you made a typo. I would download a fresh copy of the theme and do a file compare between what you have and a fresh copy of bfa_post_parts.php to see what the differences are.

tixcoca Mar 8, 2012 05:03 AM

will look into that, thanks alot!

tixcoca Mar 8, 2012 10:22 AM

I cant see any differences between the a fresh 'bfa_post_parts.php' and the one with the excerpt div modification. I also made a fresh Atahualpa install and added the excerpt modification. The characters still turns up in 'post-headline'. I noticed depending on what option in the SEO for post/page title the characters change between 1> and 2> in post-headline'.

Here is the link to the fresh install where you can see the result.

www.markuseckerman.com/wp

Thanks
TXC

juggledad Mar 8, 2012 11:02 AM

That looks like the end of the '<h2> that wraps arount the post title on a multi post page. That is n another area of the code.

tixcoca Mar 8, 2012 11:23 AM

ok, is it a typo that doesn't need to be there or? Hard to say i guess but, 'another area', do mean in the bfa_post_parts.php?

TXC

juggledad Mar 8, 2012 11:53 AM

if you look in bfa_post_parts.php you find is is broken into sections. One section deals with the post headline. That is the code that builds the html that comprises the title. I assume you have an error there...though it could be somewhere else and showing there.

it is possible that some plug-in is getting 'into the act' and causing the issue. I tried the code before posting it and it works for me.


All times are GMT -6. The time now is 03:16 PM.

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