WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Advanced Excerpt] "Read More" - Location & Styling (2 posts)

  1. planethardball
    Member
    Posted 4 years ago #

    Hi,

    Great plugin. Can you explain how to move the location of the "Read More" link? Also, is there a way to style the "Read More" link? I'm just looking to make it slightly larger and possibly bold.

    Apologies for the really basic question. I'm pretty sure the answer is somewhere in the code below, but I'm not familiar enough with it to start poking around:

    // Read more
    if(1 == $add_link)
    {
    $ellipsis = $ellipsis . sprintf(' %s', get_permalink(), $read_more);
    }

    // Adding the ellipsis
    if(($pos = strpos($text, '</p>', strlen($text) - 7)) !== false)
    {
    // Stay inside the last paragraph (if it's in the last 6 characters)
    $text = substr_replace($text, $ellipsis, $pos, 0);
    }
    else
    {
    // If <p> is an allowed tag,
    // wrap the ellipsis for consistency with excerpt markup
    if(in_array('_all', $allowed_tags) || in_array('p', $allowed_tags))
    $ellipsis = '<p>' . $ellipsis . '</p>';

    Thanks!

    http://wordpress.org/extend/plugins/advanced-excerpt/

  2. basvd
    Member
    Posted 4 years ago #

    You can choose whether the read-more link should be added in the Settings -> Excerpt page in the Administration area. You can also customize the text here.

    The appended link has class="read_more", so you can control its appearance using CSS.

    The link is place directly after the ellipsis character(s), if possible at the end of the final paragraph. At the moment, there is no way to change this without altering the code.

Topic Closed

This topic has been closed to new replies.

About this Topic