Title: holgerth's Replies | WordPress.org

---

# holgerth

  [  ](https://wordpress.org/support/users/holgerth/)

 *   [Profile](https://wordpress.org/support/users/holgerth/)
 *   [Topics Started](https://wordpress.org/support/users/holgerth/topics/)
 *   [Replies Created](https://wordpress.org/support/users/holgerth/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/holgerth/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/holgerth/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/holgerth/engagements/)
 *   [Favorites](https://wordpress.org/support/users/holgerth/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Read More Without Refresh] Ran Into a problem after updating](https://wordpress.org/support/topic/ran-into-a-problem-after-updating/)
 *  [holgerth](https://wordpress.org/support/users/holgerth/)
 * (@holgerth)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/ran-into-a-problem-after-updating/#post-11100147)
 * Hi,
 * i replaced the read_main function by the following function:
 * This way, you can have both code based on a settings page and individual Settings.
 * Kind regards
    Holger
 *     ```
       function read_main($atts, $content = null) {
       	extract(shortcode_atts(array(
       		'more' => 'READ MORE',
       		'less' => 'READ LESS'
       	), $atts));
   
       	mt_srand((double)microtime() * 1000000);
       	$rnum = mt_rand();
   
       	$new_string = '<span><a onclick="read_toggle(' . $rnum . ', \'' . get_option('rm_text') . '\', \'' . get_option('rl_text') . '\'); return false;" class="read-link" id="readlink' . $rnum . '" style="readlink" href="#">' . get_option('rm_text') . '</a></span>' . "\n";
       	$new_string = '<span><a onclick="read_toggle(' . $rnum . ', \'' . (($more == 'READ MORE') ? get_option('rm_text') : $more) . '\', \'' . (($less == 'READ LESS') ? get_option('rl_text') : $less) . '\'); return false;" class="read-link" id="readlink' . $rnum . '" style="readlink" href="#">' . (($more == 'READ MORE') ? get_option('rm_text') : $more) . '</a></span>' . "\n";
       	$new_string .= '<div class="read_div" id="read' . $rnum . '" style="display: none;">' . do_shortcode($content) . '</div>';
   
       	return $new_string;
       }
       ```
   

Viewing 1 replies (of 1 total)