Support » Plugin: Multi-Site Site List Shortcode » request: return (not echo) the output

  • Hi,

    To prevent the output (list of sites) showing before (above) the post content where the shortcode is placed, use return instead of echoing the list from within the shortcode function.

    The end of the main function would then look like this (with class added to allow custom styling) :

    		$echo = "<ul class=\"site-list\">";
    		while (list($key, $value) = each($siteList)) {
         			$echo .= "<li><a target=\"_blank\" href=\"http://" . $value . "\">" . $key . "</a></li>";
    		$echo .= "</ul>";
    		return $echo;
    	} else {
    		return "";

Viewing 1 replies (of 1 total)
  • Plugin Contributor Chris Wiegman


    Ryan, thanks for the heads up. Without any other content on my test pages I completely missed that.

    I’ll get the custom style item in the options soon, but it will be implemented in such a way as to allow input from the options page while still allowing the style code to be minimized using W3 Total Cache or something similar. As soon as I am a little less short on time I will implement this.

Viewing 1 replies (of 1 total)
  • The topic ‘request: return (not echo) the output’ is closed to new replies.