WordPress.org

Ready to get started?Download WordPress

Forums

Recent Posts with Excerpts
Remove some markup from output (1 post)

  1. jevets
    Member
    Posted 2 years ago #

    Your plugin's great, but I have a few issues:

    1. The more link is placed in a <p> with a class of alignright.
    2. The excerpt is placed in a blockquote.

    Here's some code to update to remove these items from the output. They should just output <div>s with classes so we can style via CSS.

    Replacement code:

    if ($excerpts > 0) { // show the excerpt ?>
                        <div class="rpwe"><?php
                        // the excerpt of the post
                        if (function_exists('the_excerpt_reloaded'))
                            the_excerpt_reloaded($instance['words'], $instance['tags'], 'content', FALSE, '', '', '1', '');
                        else the_excerpt();  // this covers Advanced Excerpt as well as the built-in one
                        if (!empty($instance['more_text'])) { ?><div class="rpwe-more"><a href="<?php the_permalink(); ?>"><?php echo $instance['more_text']; } ?></a></div>
                        </div><?php
                        $excerpts--;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic