WordPress.org

Ready to get started?Download WordPress

Forums

Featured Articles Lite
Help with custom theme - lingering (2 posts)

  1. WP Monkey
    Member
    Posted 2 years ago #

    I created a custom theme, so I don't know if this is my bug or if it came from a recent update. But I've noticed that a <p/> is inserted between the post heading and content paragraph when that code is not present in the original post and this is in all the slides.

    Here is my display.php code:

    <?php if ($options['section_display']==1): ?><h2><?php echo $options['section_title']?></h2><?php endif;?>
    <div class="FA_overall_container_medcure-light FA_slider" style="<?php echo $styles['x'];?>" id="<?php echo $FA_slider_id;?>">	<div class="FA_featured_articles" style="<?php echo $styles['y'];?>">
    	<?php foreach ($postslist as $post):?>
    		<div class="FA_article">
            	<div class="FA_wrap">
    				<?php if( $image = FA_article_image($post, $slider_id) ):?>
                        <div class="image_container"><img src="<?php echo $image;?>" alt="<?php the_title('','');?>" class="FA_image" width="<?php echo $options['th_width'];?>" height="<?php echo $options['th_height'];?>" /></div>
                    <?php endif;?>
                    <h2><?php if( $options['title_click'] ):?><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php endif;?><?php the_title();?><?php if( $options['title_click'] ):?></a><?php endif;?></h2>
                    <p><?php echo FA_truncate_text($post->post_content, $image ? $options['desc_truncate'] : $options['desc_truncate_noimg']);?></p>
            	</div>
    		</div>
    	<?php endforeach;?>
    	</div>
        <div class="swoopimg"></div>
    	<?php if( $options['bottom_nav'] && count($postslist) > 1 ):?>
    		<ul class="FA_navigation">
    		<?php foreach ($postslist as $k=>$post):?>
    			<li<?php if($k==0):?> class="first"<?php endif;?>>
    				<span class="FA_current"><?php the_title();?></span>
    				<a href="#" title=""></a>
    			</li>
    		<?php endforeach;?>
    		</ul>
    	<?php endif;?>
    	<?php if( $options['sideways_nav'] && count($postslist) > 1 ):?>
    		<a href="#" title="<?php __('Previous post');?>" class="FA_back"></a>
    		<a href="#" title="<?php __('Next post');?>" class="FA_next"></a>
    	<?php endif;?>
    </div>

    Thanks!

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

  2. constantin.boiangiu
    Member
    Plugin Author

    Posted 2 years ago #

    Funny, when I look at your page using Firebug, I see an empty paragraph, the paragraph containing the actual article text (the one from the theme) and below that another empty paragraph. If I look at the page source, there's the paragraph containing the article text and inside it another paragraph. Why this difference, I don't know.

    One thing you could do, if you also allowed p tags under Allow these HTML tags: is to remove the tag and probably leave only anchors. Other than that, your display file looks fine so it's probably an output problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic