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)
-   -   How is the excerpt retrieved? (http://forum.bytesforall.com/showthread.php?t=13364)

Michael T. Mar 18, 2011 06:11 AM

How is the excerpt retrieved?
 
Hi folks,

I have inside the excerpts shortcuts from other plugins (RB Internal Links) which were not evaluated when the excerpts are shown.

I changed in /atahualpa/funtion.php the return values of all exit branches from bfa_wp_trim_excerpt($text) to do_shortcode($text) - but it didn't work.
Then I had a look at ATO option "style & edit Center column/The loop" since I assumed that there would be specified, how Atahualpa overrides the default loop behaviour.
Only after changing the function the_excerpt() in /wp-include/post-template.php the shortcodes were evaluated correctly.

I'am new to WP 3.0 and Atahualpa 3.6.4 - here are my questions:

(1) how and where is bfa_wp_trim_excerpt($text) called?
(2) why didn't worked the changes in bfa_wp_trim_excerpt($text)?
(3) what is the ATO option "style & edit Center column/The loop" for?

Thnx
Michael

juggledad Mar 18, 2011 06:47 AM

First off, if you are using short codes in the text of the post, I'd suggest that you manually create the excerpts in the post itself

(1) wp_trim_excerpt() is filtered in functions.php and pointed to the function bfa_wp-trim_excerpt()
(2) probably because of the filter in (1)
(3) so you can make changes to the LOOP processing in a theme option and not have to worry about loosing the changes during theme upgrades. If you change the theme code and upgrade, you have to go back and change teh cod again (take good notes)

Michael T. Mar 18, 2011 08:42 AM

juggledad,

thanks for your fast reply!

> First off, if you are using short codes in the text of the post, I'd suggest that you manually create
> the excerpts in the post itself
I agree - I did this and will do it for the rest of my blog.

Your answers 1 & 2 -- How do these filter work? - I found no explicit function call; is this a kind of pointer mechanism like in C/C++?

Your answer 3:
> not have to worry about loosing the changes during theme upgrades.
This was the reason why I looked in the first place in the ATO section. But by default installation I found no reference to the_excerpt() or filter, nor to bfa_wp_trim_excerpt($text).
The stated code there is:
------------- Start -------
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Top'); ?>
<?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 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 -->
---------------------- end ----------------------

It seems this code is for single post pages only and not for multi post ones.

Your answers keep my stumped - there is many to learn ;-)
Michael

Michael T.

juggledad Mar 18, 2011 09:18 AM

To learn about the hooks, go to http://codex.wordpress.org/Function_...nce/add_filter

Atahualpa uses the option 'The LOOP' to allow users to control most of what is happening for a post/page. If you don't want the post title to display on a 'single' page, you could change
HTML Code:

<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
to
HTML Code:

<?php if (!is_single() ) {bfa_post_headline('<div class="post-headline">','</div>');} ?>
and now it is a theme option so the next time you upgrade, you don't have to dig into the code and change it again. THe developer (Flynn) came up with a pretty sweet process.

Michael T. Mar 18, 2011 10:26 AM

I see - is there a tech report available showing the usage of the bfa-functions?
My question how to handle excerpts isn't solved/adressed yet.

At the default, the theme shows the associated categries at the end of a single post. Is it possible, to place them below the heading?

Michael

juggledad Mar 18, 2011 12:03 PM

Quote:

is there a tech report available showing the usage of the bfa-functions?
nope, but you are free to read the code.

Quote:

the theme shows the associated categries at the end of a single post. Is it possible, to place them below the heading?
go look at the settings at ato->Edit POST/PAGE INFO ITEMS

Michael T. Mar 18, 2011 03:23 PM

Quote:

nope, but you are free to read the code.
Yuup....

Quote:

ato->Edit POST/PAGE INFO ITEMS
Yuup....

juggledad, thanks for your tips & help
Michael


All times are GMT -6. The time now is 12:29 AM.

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