Support » Plugin: WP-Markdown » [Plugin: WP-Markdown] Code not Prettifying on Main Page

  • There is a function in wp-markdown.php that determines if the prettify.js should be loaded:

    /*
    	* Function to determine if prettify should be loaded
    	*/
    	function loadPrettify(){
    		$options = get_option($this->domain);
    		if(empty($options['prettify']))
    			return false;
    
    		$savedtypes = (array) $options['post_types'];
    
    		return is_singular($savedtypes);
    
    	}

    This means that, on the main page of my blog, code will not be colorized. I recommend you change the final return to be:

    return is_singular($savedtypes) || is_home() || is_front_page();

    http://wordpress.org/extend/plugins/wp-markdown/

Viewing 1 replies (of 1 total)
  • Plugin Author Stephen Harris

    (@stephenh1988)

    Thanks Matt!

    Unfortunately I haven’t been getting email notifications from this forum, so apologies for the delay. But someone reported this on the GitHub repro, and I’ll be producing a fix shortly. It’ll be slightly different from what you propose since I don’t want to unnecessarily load javascript when its not needed.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Markdown] Code not Prettifying on Main Page’ is closed to new replies.