Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Lester Chan

    (@gamerz)

    You have to modify the plugin code to do that.

    Just swap Line 70 with 71 https://github.com/lesterchan/wp-showhide/blob/master/wp-showhide.php#L70

    Line 70 becomes:
    $output = '<div id="'.$attributes['type'].'-content-'.$post_id.'" class="sh-content '.$attributes['type'].'-content '.$hidden_class.'" style="'.$hidden_css.'">'.do_shortcode( $content ).'</div>';

    Line 71 becomes:
    $output .= '<div id="'.$attributes['type'].'-link-'.$post_id.'" class="sh-link '.$attributes['type'].'-link '.$hidden_class.'"><a href="#" onclick="showhide_toggle(\''.$attributes['type'].'\', '.$post_id.', \''.esc_js($more_text).'\', \''.esc_js($less_text).'\'); return false;"><span id="'.$attributes['type'].'-toggle-'.$post_id.'">'.$more_text.'</span></a></div>';

    Thanks.

    Is there any way to make/style the “read more” link so it won’t jump to the next line?

    Like:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. … read more

    Instead of:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
    Read more

    (Only the “read more” link, not the “read less” link)

    Also where do you control the number of scars (where it cuts the text)?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Moveable "Read More/Less" link’ is closed to new replies.