• Dear Code Syntax Block Support,

    I hope this message finds you well. I am reaching out because I’m encountering an issue with the Code Syntax Block plugin on my WordPress site.

    I am currently using the “Admired” theme and have noticed that the syntax highlighting works correctly on individual posts, but the color coding does not apply on my home page where I have post previews that include code blocks.

    I have attempted to enqueue the necessary styles and scripts on the home page using the following PHP code in my theme’s functions.php file:

    function cargar_estilos_y_scripts_code_syntax_block() {
        if ( ! is_singular() ) {
            wp_enqueue_style( 'prism-css' );
            wp_enqueue_script( 'code-syntax-block' );
        }
    }
    add_action( 'wp_enqueue_scripts', 'cargar_estilos_y_scripts_code_syntax_block' );
    


    However, the issue persists. I also tried to enqueue these resources on all pages, but it didn’t solve the problem either.

    I would greatly appreciate any assistance you could provide on this matter. Is there something I might be missing or is there another way to ensure the syntax highlighting works correctly on the home page as well?

    Looking forward to your guidance.

    Best regards,

    Fátima

    The page I need help with: [log in to see the link]

  • The topic ‘Code Syntax Block Styling Not Applying on Home Page’ is closed to new replies.