How to have the 'hide' button go back to 'show' position once clicked?
-
Hello Lester, we used your instructions to add the fragment code so that hide will be at bottom of [/showhide], how do we make it so that once clicked it goes back to ‘show’ at its initial position? Thank you in advance,
Andrea
https://www.romeadvisor.comLester Chan
Member
Plugin Author
Posted 8 months ago #https://www.ads-software.com/support/topic/moveable-read-moreless-link?replies=2
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.'”><span id=”‘.$attributes[‘type’].’-toggle-‘.$post_id.'”>’.$more_text.'</span></div>’;
- The topic ‘How to have the 'hide' button go back to 'show' position once clicked?’ is closed to new replies.