Support » Plugin: CodeMirror Blocks » Syntax highlighting not working on homepage of twenty seventeen theme

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vicky Agravat

    (@vickyagravat)

    Yes @bmoseley

    It is true that syntax highlighting is only work on single post and single page.
    It will not work on home page, as well as category archive page. Just because of many other peoples ask me that CodeMirror JS and CSS should not load on home page for some SEO purpose.

    So, currently it not works on home page.

    But, I will give solution on next plugin update.
    Where you will get extra option on settings page that you want load it on home page, or archive page.

    if you want to do it now.
    just edit wp-codemirror-block/includes/class-codemirror-blocks.php file
    Go to line 284
    replace that line
    if(!empty($matches) && (is_single() || is_page()) ) {
    with this line
    if(!empty($matches) ) {

    Thank you.

    great thanks a lot for the fast reply!!

    Plugin Author Vicky Agravat

    (@vickyagravat)

    Hello @bmoseley

    Now you have a option to highlight code block on home page.
    Just, go to CodeMirror Block settings page, Select Yes on Enable Code Block on Home Page? Save it.

    Please update the plugin to 1.2.0

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.