WordPress.org

Ready to get started?Download WordPress

Forums

Featured Articles Lite
[resolved] Using Post Excerpts/Line Breaks in Slider (8 posts)

  1. philreardon
    Member
    Posted 2 years ago #

    Hi there,

    I have two minor issues with the plugin:

    1. Is there any way to have the slider display ONLY the post excerpt (ie before the<!--More--> tag? I use it frequently and it'd be nice to have FA take it into account providing the excerpt is short enough.
    2. Also, I've allowed for the <p> tag in the slider, but it seems to be ignoring line breaks altogether, any thoughts?

    Thanks!

    http://wordpress.org/extend/plugins/featured-articles-lite/

  2. constantin.boiangiu
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    1. Not for the moment but will be available with the next update.
    2. There's a problem with the truncation function, I know about it, didn't had the time to solve it though. Will try to do it ASAP.

  3. mjbrooklyn
    Member
    Posted 2 years ago #

    Hi there!

    Any progress on issue #2 - line breaks? Any known workarounds out there? I have a client who is very anxious to get page breaks working on his FA Lite sliders.

    http://www.trustmeimascientist.com

  4. constantin.boiangiu
    Member
    Plugin Author

    Posted 2 years ago #

    Have you tried except of p tags to allow <br> and maybe <br /> ?

  5. Francis Crossen
    Member
    Posted 2 years ago #

    I needed to display excerpts when available, with a fallback to the truncated content. Since excerpts allow for HTML, this was perfect for me.

    Here's the fix:

    In themes/{theme_name}/display.php, change:

    <p><?php echo FA_truncate_text($post->FA_post_content, $image ? $options['desc_truncate'] : $options['desc_truncate_noimg']);?></p>

    to

    <p>
    		<?php 	if( $post->post_excerpt) {
    				echo $post->post_excerpt;
    			}
    			else {
    				echo FA_truncate_text($post->FA_post_content, $image ? $options['desc_truncate'] : $options['desc_truncate_noimg']);
    			}
    		?>
    		</p>

    Hope this helps.

  6. mjbrooklyn
    Member
    Posted 2 years ago #

    Hi again guys,

    Constantin and fcrossen - I tried both your suggestions, but it's still not working for me.

    Any other ideas? When is the next FA Lite update due?

  7. constantin.boiangiu
    Member
    Plugin Author

    Posted 2 years ago #

    We do out best to be ready with the next update by the end of this month. It was a lot of work and still is (for this and for clients I have) but hopefully with time this will turn into a full time job. Time will tell.
    About your line breaks problem, allowing them in slider settings should do it (at least technically) but if you say it doesn't one thing you could do is disable HTML stripping from the text altogether.
    In file includes/common.php, inside function FA_truncate_text almost at the end of the function you'll notice php function strip_tags is used. Either remove that function completely or manually allow br tags in it. If you don't know how to do that, contact me on from http://www.php-help.ro and we'll continue this over e-mail.

  8. mjbrooklyn
    Member
    Posted 2 years ago #

    Constantin, I totally understand how hard it is to make a living freelancing! Thanks a lot for all your help.

    I think we'll wait for the next update to make any changes. Maybe the WordPress theme I'm using (Thematic Child Theme) is causing the conflict.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic