WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Most Recent Posts Mod
[resolved] afterexcerpt bug (2 posts)

  1. zorbs
    Member
    Posted 3 years ago #

    In my setup, and although the $afterexcerpt label was echoed correctly, the underlying URL was always the one at the top of the list.

    Here is how I fixed this:

    In line 411 I load the new url string in a new variable :$afterexcerptStr
    if ($afterexcerptlink) $afterexcerptStr = 'ID) . '">' . $afterexcerpt . '';

    Then, I use this variable in line 418 in order to create the completed variable $excerpt.

    Below is the complete, edited segment.
    I hope this helps someone else in-need!

    if ($afterexcerptlink) $afterexcerptStr = '<a href="' . get_permalink($post->ID) . '">' . $afterexcerpt . '</a>';
    				if ($excerptlengthwords > 0 ) {
    					$words = array_splice($words, 0, $excerptlengthwords);
    					$excerpt = implode(' ', $words);
    				}elseif(strlen($excerpt) > $excerptlength) {
    					$excerpt = mb_substr($excerpt, 0, $excerptlength);
    				}
    				$excerpt = $separator . ($spot == 'spot3' ? '<span class="date">'.$time.'</span> ' : '') . $excerpt . $afterexcerptStr;
    			}

    http://wordpress.org/extend/plugins/advanced-most-recent-posts-mod/

  2. Kailey (trepmal)
    Volunteer Mod & Reviewer
    Plugin Author

    Posted 3 years ago #

    Thanks for posting a solution for everyone to use!

    I've finally added a fix to the plugin... :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic